How to use facebook test users from android

被刻印的时光 ゝ 提交于 2019-12-18 13:29:23

问题


I need help using the facebook test users from android.I am using the facebook android sdk and i need to be able to login as a test user and do actions like publish to the stream. I do not want to use the developer account associated with this application since it is my personal account. I realize that test users can only be created using api calls and such a call returns the login url, i understand how to use this in a browser but how can i use it in my android application. Can i create a dummy account and work with that account or is this against facebook policy.


回答1:


Test users can also be created with GUI - not only by API calls. GUI is useful if You need to handle just few users. If there is a plenty of them - it is easier to use API and perform it programatically.

How to handle test users by FB GUI:

  1. Go to FB developer site, where You created FB Application
  2. on application tab, click Edit Roles
  3. At the bottom of the page there is 'Test users' section where all test users are listed. This is where test users can be created and edited. Each user has option to log in as this user, change his name and set password next to his profile photo.
  4. You have to set user's password to be able to login as him
  5. Use his profile email address and password to login - it is also possible from Your app

You can create a dummy account but this is against FB policy and FB really does everything to make it harder to You :) This is not an option. Use test users.

If more info is needed on the topic - see my article, regarding test users strategy. All the detail see on the official FB page




回答2:


See an open bug in facebook. You can't login as test user with native Android app, but login with m.facebook.com should work




回答3:


https://graph.facebook.com/me?access_token=ACCESS_TOKEN

where the access_token is the token from when the user approved your app. Found it here.



来源:https://stackoverflow.com/questions/4781486/how-to-use-facebook-test-users-from-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!