gpt4 book ai didi

facebook - 使用 Facebook Graph API 作为链接类型发布

转载 作者:行者123 更新时间:2023-11-30 05:20:35 26 4
gpt4 key购买 nike

我正在使用 Facebook Graph API 在用户的墙上发布。我给它这些参数:

message
name
description
picture
link
caption

它张贴到墙上,但没有将其视为链接。我知道这一点,因为它在单击链接时不会打开新选项卡,没有共享操作链接,并且 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);

关于facebook - 使用 Facebook Graph API 作为链接类型发布,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3746159/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com