我正在尝试通过Facebook Graph API的应用程序将图像上传到我的粉丝页面的相册。虽然我提供了相册ID,如上传图片的参数,但它已经上传到我自己的个人资料中的APPLICATION_NAME照片专辑中。粉丝专页的相册留空。我也尝试发送我的粉丝页面的pageID而不是albumID,但结果是一样的。我用于上传的代码是:
I am trying to upload an image through my application with Facebook Graph API to an album of my fan page. Although I provide the albumID like a parameter for uploading the image, it is uploaded in an album named APPLICATION_NAME Photos on my own profile. The album of the fan page stays empty. I tried also with sending the pageID of my fan page instead of albumID, but the result is the same. The code I use for the upload is:
$fb_pfoto = $facebook->api('/' . $albumID . '/photos','POST', array( 'access_token' => $session['access_token'], 'message' => 'Caption', 'source' => '@' . realpath( '/path/to/image.jpg' ) ));请给我想法如何将图像上传到粉丝专页,而不是我自己的个人资料相册
Please give me ideas how can I upload the image to the fan page and not to my own profile album.
推荐答案不知道这是否有帮助,但也许您需要请求 manage_pages 扩展许可,然后使用返回的页面access_token来发布图片。您可以简要地了解此过程此处。
Don't know if this would help but maybe you need to request manage_pages extended permission and then use returned page access_token for posting pictures. You can read briefly about this process here.
然后您可以尝试这些链接与页面访问令牌发布照片:
Then you can try these links with page access token for posting photos:
/me/photos /<page_id>/photos /<album_id>/photos更多推荐
使用API将图片上传到Facebook粉丝专页
发布评论