在Facebook页面上发布 [英] Post on Facebook Page

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

问题描述

嗨..

我需要使用c#.net代码在Facebook页面上发布而不使用外部库。

我有AppID,AppSecret,PageId和PageAccessToken我。

请帮助我。

解决方案

获得此答案的最佳地点是Facebook开发者网站。



我将开始 https://开发人员。 facebook.com/docs/reference/dialogs/send/ [ ^ ]然后查看他们的其他示例。


看到这个...... :)

 FacebookApp fbApp =  new  FacebookApp(); 
FacebookApp app = new FacebookApp(fbApp.Session.AccessToken);
var args = new 字典<字符串, > ();
args [ message] = abc;
args [ caption] = 这是标题!;
args [ description] = 这是描述!;
args [ name] = 这是名字!;
args [ picture] = [您的图片网址];
args [ link] = [您的链接网址];

app.Api( / me / feed,args,HttpMethod .Post);





您需要在app.Api的参数中替换/我的页面的特定ID。我不确定它是否正确,但它适用于用户的墙贴:-)



参考:

< a href =http://stackoverflow.com/questions/4361561/how-can-i-use-the-facebook-c-sharp-sdk-to-post-on-facebook-pages> http:// stackoverflow .com / questions / 4361561 / how-can-i-use-the-facebook-c-sharp-sdk-to-post-on-facebook-pages [ ^


Hi..
I need to Post on Facebook Page using c#.net code and without using external library.
I have AppID,AppSecret,PageId and PageAccessToken with me.
Please help me.

解决方案

The best place to get answers for this would be on Facebooks developer website.

I would start https://developers.facebook.com/docs/reference/dialogs/send/[^] and then look at the other examples they have.


see this...:)

FacebookApp fbApp = new FacebookApp();
FacebookApp app = new FacebookApp(fbApp.Session.AccessToken);
var args = new Dictionary<string,>();
args["message"] = "abc";
args["caption"] = "This is caption!";
args["description"] = "This is description!";
args["name"] = "This is name!";
args["picture"] = "[your image URL]";
args["link"] = "[your link URL]";

app.Api("/me/feed", args, HttpMethod.Post);



You need to replace /me in app.Api's arguments to the specific id of page. I'm not sure if its the right way, but it works for wall post of a user :-)

reference:
http://stackoverflow.com/questions/4361561/how-can-i-use-the-facebook-c-sharp-sdk-to-post-on-facebook-pages[^]


这篇关于在Facebook页面上发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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