我正在使用Facebook Graph API在用户的墙上发布.我给它这些参数:
message
name
description
picture
link
caption
Run Code Online (Sandbox Code Playgroud)
它贴在墙上,但它没有把它当作一个链接.我知道这一点,因为它在单击链接时没有打开新选项卡,没有共享操作链接,Twitter也没有选择它,因为我只通过链接过滤我的墙.
我看到Facebook文档有两个单独的文档页面用于发布"发布"和"链接"对象..但链接发布到相同的图形路径,所以我不确定如何支持它的工作:
http://developers.facebook.com/docs/reference/api/post
http://developers.facebook.com/docs/reference/api/link
有人这个有用吗?
使用 codeplex.com 上提供的 facebook API 并尝试一下,
Facebook.Rest.attachment_media_image image1 = new attachment_media_image();
image1.href = "";
image1.src = "";
Facebook.Rest.attachment a = new Facebook.Rest.attachment();
a.media = new List<Facebook.Rest.attachment_media> { image1 };
a.href = "";
a.name = "";
a.caption = "{*actor*}";
a.properties = null;
if(fbapi.Users.HasAppPermission(Enums.ExtendedPermissions.publish_stream))
fbapi.Stream.Publish(" Your message", a,
new List<action_link>()
{
new action_link()
{
text = "",
href = ""
}
},
null, 0);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13478 次 |
| 最近记录: |