Request user verification via Facebook Graph API

I am creating an application with Facebook Connect. I created a test user using the methods from http://developers.facebook.com/blog/post/429 .

I can log in to Facebook as a newly created user, but I can’t access the basic information for the user through the Facebook API. With real users, I can use URLs such as http://graph.facebook.com/ . This does not work with my test user.

I tried the same URL using CURL with and without application access token using http and https.

Does anyone know if Facebook users can test requests through the chart API, and if so, how?

+4
source share
3 answers

Thanks for the help. Finally, I sent a message to a Facebook software specialist who wrote an article that I linked to in my question and he gave me an answer.

You can request a test user only using the access token of another test user.

I do not know how useful this is if the application uses a graphical API. This means that the application access token is not enough to request users of the test. I may not like this, but it seems to be the answer.

+2
source

You need to use the user's access token (or maybe the access token of any of the users of the application). You should be able to request a user access token using the Graph API (only GET / app_id / accounts / test-users). This will give you the id and token. Then make a second API call using the received token (https://graph.facebook.com/id? Access_token = ...)

So, if your user ID is 10017 and the access token is ABC, the call will be https://graph.facebook.com/10017?access_token=ABC .

+3
source

One of the comments in the post: β€œYou can see the wall of the test account by logging in to both the test account and as a friend of this test account (only test accounts can be friendly test accounts). Use the login_url property to logging in. "

Therefore, I suggest that you log in as a user and add information such as a regular profile, and then try to access it. I do not believe that it gives you "dummy data" by default, other than your login information.

Also: see the document for test users . He received information about restrictions and ways to access user accounts.

UPDATE: AFAIK for api test user does not allow to resolve requests with api schedule for information other than login token.

+1
source

Source: https://habr.com/ru/post/1336228/


All Articles