facebook-c#-sdk

Facebook C# SDK OAuth Exception “ClientID required”

末鹿安然 提交于 2019-12-12 04:44:30
问题 This question is, I think, similar to my previous one. Using the latest C# Facebook SDK on .NET 4 I get an Exception with the message "ClientID required" with the following code on the last line: var app = new DefaultFacebookApplication(); app.AppId = "appId"; app.AppSecret = "secret"; var fb = new FacebookWebContext(app); fb.IsAuthenticated(); App ID and secret are properly set. The stack trace of the exception is the following: System.Exception occurred Message=ClientID required. Source

Facebook C# SDK Sample to Post To Group Wall

冷暖自知 提交于 2019-12-12 03:21:15
问题 Please give a sample of how to post to a group wall using the C# Facebook SDK found at this location https://github.com/facebook-csharp-sdk/facebook-csharp-sdk . Below is just a few lines of relevant code. An fb client is created, parameters filled in (not shown), and a fb.post call is made. For my attempt to post to a group wall, all I did was change the "me/feed" to "groupId/feed". I could probably figure out what is wrong but the Facebook error provides no information. The error returned

how do i implement like feature with facebook c# SDK?

雨燕双飞 提交于 2019-12-12 03:16:05
问题 I am using facebook C# SDK 5.3.2 for desktop application and i created desktop app using this sdk. I can now post messages but i also like and share posted messages. It seems that i should get postid and then post messages with parameter "/me/likes" along with postid. But i couln't manage it till now. 回答1: for the graph to like a post (see https://developers.facebook.com/docs/reference/api/post/), all you need to do is HTTP post to {post ID}/likes without any parameters. This assumes the user

POST to /likes only works after GET - bug or by design?

老子叫甜甜 提交于 2019-12-12 02:48:00
问题 My app has permissions to "like" something on FB on a user's behalf. Using the Facebook C# SDK (5.4.1), here's what I wrote: Facebook.FacebookClient fb = new Facebook.FacebookClient(AccessToken); object o = fb.Get("1234567890_12345678901234567/likes"); dynamic parameters = new ExpandoObject(); dynamic success = fb.Post("1234567890_12345678901234567/likes", parameters); The second line is superfluous and creates an unnecessary round-trip, as we're not interested in the other "likes" on the

Invite users to register at my site through Facebook

跟風遠走 提交于 2019-12-11 23:13:41
问题 I read a lot of documentation and watched a video about Facebook C# SDK but I still cannot get my head around it! I need to do the following but I do not know if that's even possible... User clicks on a button on mysite.com. The button opens up a dialog that asks the user to sign-in with their facebook account. In case they do, I need to access their friends' list and send invites to their friends asking them to register at mysite.com The invite links should take them to mysite.com/User

Does Facebook open a canvas app with a Post request? It's causing havoc with my MVC actions

岁酱吖の 提交于 2019-12-11 22:44:36
问题 I've created an MVC app that has a Friend view which has a post action, see code below. When I'm loading the page for the first time my POST method is getting called. I found this http://developers.facebook.com/docs/canvas/post/ and just wondered if someone could clarify that Facebook is calling the post method to pass in data. In which case the best way around my problem is to rename my POST action? Here's my code with unnecessary bits stripped out: public ActionResult Friend() { ViewData[

FQL.Multiquery - query syntax when passing as parameter

强颜欢笑 提交于 2019-12-11 18:41:26
问题 Looking for a little help with a simple task...the syntax for a facebook multi-query, where you'd pass in the query as a parameter. Here is my method: public dynamic FBFQL(string strQuery) { try { var fb = new FacebookClient(this.FacebookAccessToken); //dynamic objFQL = fb.Get("fql", new { q = strQuery }); dynamic objFQL = fb.Get("fql", new { q = new { strQuery } }); if (objFQL == null) { return null; } else { return objFQL; } } catch (FacebookApiException ex) { FacebookErrorHandler(ex);

facebook-c#-sdk FacebookUriMapper

ぃ、小莉子 提交于 2019-12-11 17:39:04
问题 I'm tring to follow the Configuring tutorial of the Facebook SDK for .NET. But when I add the RootFrame.UriMapper = new FacebookUriMapper(); line of code the NavigationService seems stop to work. The app start's fine but the command NavigationService.Navigate(new Uri("/Views/LoginPage.xaml", UriKind.Relative)); inserted in a Button on init app page don't work. Other commands on same button like a MessageBox.Show works fine. Thank you for any help you can provide. 回答1: The file

'System.Collections.Generic.KeyValuePair<string,object>' does not contain a definition for 'work'

女生的网名这么多〃 提交于 2019-12-11 17:29:38
问题 namespace WebApplication1.Site { public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { var accessToken = "" // Token var client = new FacebookClient(accessToken); dynamic myInfo = client.Get("me/friends", new { fields = "name,id,work" }); foreach (dynamic friend in myInfo) { foreach (dynamic work in friend.work ?? new[] { new { employer = new { name = string.Empty }, position = new { name = string.Empty } } }) { Response.Write("Employer: "

How to get posts of user

那年仲夏 提交于 2019-12-11 16:44:15
问题 I was trying to get data of wall posts but failed .I am using facebook sdk at codeplex http://facebooksdk.codeplex.com/documentation they have given code to get posts but when i replace my token and change dynamic result = app.Get("19292868552_118464504835613"); to dynamic result = app.Get("/me/feed"); the line string fromName = result.from.name; throws exception that from is not present in result. then i added some break point and watched them here is picture you see the difference in two