将照片从应用程序用户上传到粉丝页 [英] Upload photo to fanpage from application user

查看:134
本文介绍了将照片从应用程序用户上传到粉丝页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Facebook应用程序,用户可以将照片上传到Facebook粉丝页面。我无法确定如何使用该应用程序的用户上传照片。目前,我可以让fanpage上传照片作为自己的照片,所以fanpage失去了照片的作者。

I have a Facebook application in which a user can upload photos to a facebook fanpage. I am having trouble figuring out how to upload the photo as the user that is using the application. Currently I can have the fanpage upload the photo as itself, so the fanpage loses the author of the photo.

为了做到这一点,我抓住了粉丝页面的auth令牌(其中我假设应用程序是作为粉丝页面发布的原因),并使用它传递到api的照片方法。我使用的是AS3 api,但我确信这个概念是一样的,无论我使用哪个api。

To do this I am grabbing the fan page's auth token(which I am assuming is the reason the app is posting as the fan page) and using that to pass to the "photos" method of the api. I am using the AS3 api, but I am sure the concept is the same no matter which api I am using.

var values:Object = {message:"message here", name:"title here"};
values.access_token = fanPageAccessToken;
values.image = file;
Facebook.api('fanPageId/photos/', handleUploadComplete, values,'POST');

当我更改为用户的访问令牌时,图像被上传到用户的照片。即使我指定了fanPageId,它被上传到用户的照片。

When I change to the user's access token the image is uploaded to the user's photos. Even though I am specifying the fanPageId, it gets uploaded to the user's photos.

我在这里挣扎。有没有人有想法可以尝试,还是有一些洞察力分享?

I am struggling here. Does anyone have an idea I can try, or some insight to share?

非常感谢你,我感谢你的时间!

Thank you so much, I appreciate your time!

推荐答案

我已经尝试过每种可能的API组合,将照片发布到用户的页面,但没有用。用户无法将照片发布到页面。即使在页面上创建一个专辑,然后发布到该页面也不起作用。

I've tried every possible API combination to post a photo to a page from the user, but it's no use. A user cannot post a photo to a page. Even creating an album on the page and then posting to that doesn't work.

这篇关于将照片从应用程序用户上传到粉丝页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆