在Facebook页面上发布 [英] Post on Facebook Page
问题描述
嗨..
我需要使用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屋!