发布为Facebook Graph API的链接类型 [英] Post as link type with Facebook Graph API

查看:98
本文介绍了发布为Facebook Graph API的链接类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am using the Facebook Graph API to publish on a user's wall. I give it these parameters:

message
name
description
picture
link
caption

它发布到墙上,但不将其视为链接。我知道这一点,因为它没有打开一个新的标签,当链接被点击,没有共享行动链接,而Twitter不会接收它,因为我已经通过链接过滤我的墙。

It posts to the wall, but it is not treating it as a link. I know this because it does not open a new tab when the link is clicked, there is no share action link, and Twitter does not pick it up because I have it filtering my wall by links only.

我看到Facebook文档有两个单独的文档页面,用于发布Post和Link对象。但链接发布到相同的图形路径,所以我不知道如何支持工作:

I see the Facebook docs has two separate documentation pages for publish "Post" and "Link" objects.. but the links is posting to the same graph path so I am not sure how it is supported to work:

http://开发人员.facebook.com / docs / reference / api / post

http://developers.facebook.com/docs/reference/api/link

任何人都有这个工作?

推荐答案

使用codeplex.com上提供的facebook API可以尝试,

Use the facebook API's available on codeplex.com and try this out,

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 Graph API的链接类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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