Facebook流带附件发布
本文关键字:Facebook | 更新日期: 2023-09-27 18:26:23
我试图使用此页面中的测试控制台在墙上发布带有swf附件的内容,因此我在附件中填写了以下内容:
{"media": [{
"type": "flash",
"swfsrc": "http://www.alsacreations.fr/flashdir/dewplayer.swf?mp3=http://storage.musiclife.kz/2011-07/47449_3b012dcc460023b8be23f7af451e173f.mp3",
"imgsrc": "http://bikeweb.com/files/images/ride_it_forever_000113-1313.jpg",
"width": "80",
"height": "60",
"expanded_width": "160",
"expanded_height": "120"
}]}
它发布了所有内容,但当我点击附件时,它会打开一个带有swf的不同窗口,当我希望它像youtube和我看到的几个网站一样在线播放时,我不确定我做错了什么?知道吗?
我也想用Facebook C#SDK来解决这个问题,我需要在以下代码中更改什么:
_fbClient = new FacebookClient(accessToken);
var postparameters = new Dictionary<string, object>();
postparameters["message"] = "Test";
postparameters["name"] = "This is a name";
var result = _fbClient.Post("/me/feed", postparameters);
这是我在PHP中使用的wat,直到Facebook在Timeline上引入带有附件的bug。他们修复了它,这个应该会再次工作,但老实说,我还没有尝试过
$attachment = array
(
'access_token'=>$facebook->getAccessToken(),
'message' => 'The message from the user - probably a submitted <textarea>',
'name' => 'Name of the link',
'caption' => 'Caption',
'link' => 'the url to your application or whatever you wish',
'description' => 'our description',
'picture' => 'url of the image preview - required for flash',
'type' => 'flash',
'source' => 'the url to the flash file',
);
try {
$statusUpdate = $facebook->api('/me/feed', 'post', $attachment);
}
catch (FacebookApiException $e) {
error_log($e);
}
}