开发者

user access token, wrong format

开发者 https://www.devze.com 2023-04-12 17:25 出处:网络
I\'m going to explain my code: A) user log\'s in to my app and gives permission for publish_stream and user开发者_如何转开发_photos

I'm going to explain my code:

A) user log's in to my app and gives permission for publish_stream and user开发者_如何转开发_photos

B) the app makes an API call and gets all the user's albums in a dropdownlist

C) the user chooses a picture by browsing his computer, using the multipart/form-data as suggested by Facebook

D) the user chooses an album form the dropdownlist and submits the form

E) then facebook redirects the user to a page with this URL:

https://graph.facebook.com/[album-idd]/photos

and instead of displaying the ID of the newly uploaded picture(like they say in the developer documentation), facebook displays this:

{
   "error": {
      "message": "A user access token is required to request this resource.",
      "type": "OAuthException"
   }
}

But when i try to get the access token it's format is:

AAADnKCRahQQBANVoNY3LHLVjYpiYzEm2h7vZAbXxDz29nvJTW9m3gmlgu1JOwdbqYHMa8jQyTnqcS1LU0RuMW2GqBs2OnOowZCinK4CDDD87snZAYQF

instead of the format aaa|bbb|ccc. What am i doing wrong? and do i get the right access token? or is this a wrong one?


Facebook has changed the acess token format. What you are getting is the correct token. Check that your token is working by visiting this link:

https://graph.facebook.com/me?access_token={access_token from your question}

Also, check out the following links to get an idea of what has changed:

https://developers.facebook.com/blog/post/497/
https://developers.facebook.com/blog/post/555/

If you have any problems using the new access token, please elaborate them a bit further.

0

精彩评论

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