开发者

Getting "This method must be called with an app access_token" adding test users via graph api

开发者 https://www.devze.com 2023-03-31 21:20 出处:网络
I\'m trying to create Facebook test accounts using the graph API. (I need to be able to log into them from my iphone app).Here\'s how I\'m getting the app access token:

I'm trying to create Facebook test accounts using the graph API. (I need to be able to log into them from my iphone app). Here's how I'm getting the app access token:

https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=MY-CLIENT-ID&client_secret=MY-CLIENT-SECRET

which seems to work fine. And here's how I'm trying to create a user:

https://graph.facebook.com/MY-APP-ID/accounts/test-users?installed=true&name=TestUser1&permissions=read_stream&method=post&access_token=MY-APP-ACCESS-TOKEN

The response I'm getting is:

This 开发者_JS百科method must be called with an app access_token

I looked at this post Problem with access token while creating Facebook Test Users. Not really familiar with PHP, and just to make sure, I did try to "url encode" the app access token returned before using it... but no goodness.

I'm using Fiddler to test my posts.

Thanks!


Facebook doesn't support test users for Native Mobile App

see related bug on bugzilla http://bugs.developers.facebook.net/show_bug.cgi?id=17779

hope this helps


Did you remove the 'access_token=' part from access token that's returned from the first request? If not, then you'll have an incorrect request on the second call, since the URL will have 'access_token=' twice.

0

精彩评论

暂无评论...
验证码 换一张
取 消