api - Facebook: How to set app test users as friends? -
1) try access token app described in docs:
to obtain app access token, invoke following http request https://graph.facebook.com/oauth/access_token? client_id=your_app_id &client_secret=your_app_secret &grant_type=client_credentials api respond query-string formatted string of form: access_token=your_app_access_token
i access token strange splitter sign | result:
access_token=568852943149232|ah1x8caxhksvfrtrz4xybg0gzr4
this seems in conflict docs, because first parameter app_id (before sign |).
2) try use strange access_token friend's access tokens (it requires make invisible test users friends):
https://graph.facebook.com/app_id/accounts/test-users?access_token=568852943149232|ah1x8caxhksvfrtrz4xybg0gzr4
it returns:
{ "error": { "message": "(#803) of aliases requested not exist: app_id", "type": "oauthexception", "code": 803 } }
if remove part before | (including sign |) , make request returns error:
{ "error": { "message": "invalid oauth access token.", "type": "oauthexception", "code": 190 } }
3) in result need make 'friend' request 1 user , response (described here):
https://graph.facebook.com/user1_id/friends/user2_id?method=post&access_token=test_user_1_access_token https://graph.facebook.com/user2_id/friends/user1_id?method=post&access_token=test_user_2_access_token
i can't because can't these (users') access tokens on step 2.
is returning app access_token correct? if yes, how use it?
notice please
: make calls address line of browser, app owner in logged-in state.
you need replace app_id actual app_id
that's why message.
{ "error": { "message": "(#803) of aliases requested not exist: app_id", "type": "oauthexception", "code": 803 } }
if app id 568852943149232 , app token 568852943149232|ah1x8caxhksvfrtrz4xybg0gzr4 call is
https://graph.facebook.com/568852943149232/accounts/test-users?access_token=568852943149232|ah1x8caxhksvfrtrz4xybg0gzr4
that indeed app token verifiable https://developers.facebook.com/tools/access_token
Comments
Post a Comment