开发者

How to get album id and to upload image to fan page album

All available descriptions to upload an image to a fanpage use an album id, but no one describes the format of the id and how to get it. Are there examples of php code to get the album id of an a开发者_Go百科lbum on a fanpage and examples to upload an image to that page


Here are the steps you will need to build, using the graph api.

  1. Get the facebook ID for the page.
  2. Get an access_token from the page you want to upload to.
  3. Make a form to POST to "https://graph.facebook.com/". $_userID . "/photos?access_token=". $_accessToken

The image will be uploaded to a folder with the same name as you app. So if your app is called "Magic Photo Uploader", the photos will go into a folder called "Magic Photo Uploader Photos"

In my experience you will not need an album ID, I think that documentation is outdated, since for all my apps it makes a album for those app photos and I cannot rename it. But there was once upon a facebook, a REST API that used to let you create and populate albums. Not sure if that is still accessible as a legacy.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜