我有一个有点麻烦与facebook的动作图形API
i'm having a bit of trouble with the facebook actionscript graph api
虽然我可以张贴到/进与Facebook.ui工作,(做了Facebook的弹出式),我似乎无法得到它与Facebook.api工作 这里是我的code:
While i can get posting to "/feed" to work with Facebook.ui, (does a facebook popup), i can't seem to get it to work with Facebook.api here is my code:
var values:Object = {
name:"This is my title",
link:"http://example.com",
picture:"https://m.xsw88.com/allimgs/daicuo/20230908/565.png.gif",
caption:"this is a caption",
description:"this is a long description",
message:"This is a test message. There are many like it but this one is mine.",
actions:
{
name:"Crazy extra thing",
link:"http://example.com"
}
};
Facebook.api(_user + "/feed", handleSubmitFeed, values, URLRequestMethod.POST);
这是所谓的Facebook.login()之后的权限read_stream,publish_stream,user_likes成功,并且ID存储在_user。我得到以下错误:
this is called after Facebook.login() with the permissions "read_stream,publish_stream,user_likes" succeeds and the id is stored in _user. I get the following error:
[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: https://graph.facebook.com/********/feed"]
我并没有与其他呼叫任何麻烦来更新用户状态(/状态)或检索他们的好友列表。
I'm not having any trouble with other calls to update the user's status ("/statuses") or retrieving their friends list.
任何想法是什么问题,可能是吗?
Any ideas as to what the issue might be please?
谢谢 OB
你有没有添加publish_stream到您的权限?我在自己的网站上使用这些权限和它工作得很好:
Have you added the publish_stream to your permissions? I use these permissions in my own website and it works just fine:
public function FBConnect()
{
super();
//Set applicationid
_applicationID = "YourID";
//Set permissions to ask for
_extendedPermissions = {perms:"read_stream, publish_stream, user_about_me, read_friendlists, user_photos"};
//Initialize facebook
Facebook.init(_applicationID);
}
其次,你有没有accestoken?发布一个流时,你有这个标记只允许。这就是我发布到一个流:
Secondly, do you have the accestoken? publishing to a stream is only allowed when you have this token. this is how I publish to a stream:
public function post(_message:String):void
{
var _params:Object = new Object();
_params.access_token = Facebook.getSession().accessToken;
_params.message = _message;
Facebook.api("/" + _user + "/feed", messagePosted, _params, "POST");
}
最后所有的,但我不认为这将是一个问题,因为你已经可以更新状态:你知道GraphApi只能在网上? (或进行一些调整,它也可以在本地主机上)。
last of all, but i don't think this will be a problem because you can update statuses already: you know that GraphApi only works online? (or with some adjustments, it also works on localhost).
这是关于它,我想,我想不出别的。任何其他问题:随时欢迎:)
that's about it i guess, i can't think of anything else. any other questions: always welcome :)