facebook-c#-sdk

How to Handle Facebook Application Requests?

╄→гoц情女王★ 提交于 2019-11-30 20:03:44
I am working on a Facebook application And I am offering the user to invite his friend to the application using the C# SDK. as shown in Facebook documentation My problem is when the friend of the user receive the application request and click Accept it does not show the application permission request page . Do I need to preform any extra step to redirect the user to the application permission request page ? i found the solution i start ask for permission on my application canvas page and if user accept, redirect to the same page with query string. not perfect solution but it works fine

getting user profile picture using facebook c# sdk from codeplex

こ雲淡風輕ζ 提交于 2019-11-30 18:58:15
I am using facebook C# sdk from codeplex and trying to download user's profile picture. I know I can get this from: http://graph.facebook.com/UID/picture?type=large but this URL then posts to a second url with the actual picture. How do I get the second URL? There is a post on stackoverflow that talks about parsing json, how do I do this? var app = new FacebookApp(); var me = (IDictionary<string, object>)app.Get("me"); string firstName = (string)me["first_name"]; string lastName = (string)me["last_name"]; string gender = (string)me["gender"]; string email = (string)me["email"]; long facebook

Multiple facebook apps under one web application

隐身守侯 提交于 2019-11-30 17:28:01
问题 I'm trying to use the umbraco cms for a few facebook apps. My idea was to have each facebook app in an aspx page in umbraco (these "apps" are very simple, only a few images, maybe a poll in each). But I can have only one facebookSettings in web.config. Is it possible to not set the facebook app in web.config but set the settings in the code behind? Or is there another way to have multiple facebook apps in one web application (umbraco)? EDIT: I'm using facebooksdk 5.0.2 beta 回答1: See section 4

Get access token to facebook page - WPF

∥☆過路亽.° 提交于 2019-11-30 16:24:28
I am developing a WPF application that needs post on wall of a facebook's Page, and this without login window. Well, I want to get access token for my facebook page, and this is my code. var fb = new FacebookClient(); string token = ""; dynamic accounts = fb.Get("/"<USER_ID>"/accounts"); foreach (dynamic account in accounts) { if (account.id == <PAGE_ID>) { token = account.access_token; break; } } But I receive a error #104. It is a simple error, that I need a access token to do this operation. Then I use other code to get the user access token var fb = new FacebookClient(); dynamic result =

Get access token to facebook page - WPF

只愿长相守 提交于 2019-11-30 16:14:28
问题 I am developing a WPF application that needs post on wall of a facebook's Page, and this without login window. Well, I want to get access token for my facebook page, and this is my code. var fb = new FacebookClient(); string token = ""; dynamic accounts = fb.Get("/"<USER_ID>"/accounts"); foreach (dynamic account in accounts) { if (account.id == <PAGE_ID>) { token = account.access_token; break; } } But I receive a error #104. It is a simple error, that I need a access token to do this

How do I parse a signed request in Facebook C# SDK?

爱⌒轻易说出口 提交于 2019-11-30 15:07:14
I'm trying to create a FB credits callback page, and need to parse the signed request coming in. I can write something manually, but it seems like this is something that should be in the SDK somewhere but I can't seem to find it in the API. Andy Sinclair Simply call the static method Parse on the FacebookSignedRequest class as shown below (with your app secret, and the signed request): var DecodedSignedRequest = FacebookSignedRequest.Parse(FacebookContext.Current.AppSecret, SignedRequest); Now you will see all the data (in JSON format) from the signed request in DecodedSignedRequest . prabir

Post On Facebook Page As Page Not As Admin User Using Facebook C# SDK

不打扰是莪最后的温柔 提交于 2019-11-30 10:07:10
I'm developing C# application which manages fan page on Facebook which uses Facebook C# SDK. I've encountered two problems one is connected with posting messages on wall and the other concerns creating events on fan page. Is it possible to post a message on fan page wall as a fan page not a admin user ? Can I programmatically create event on fan page (not as admin but as a fan page) using Facebook C# SDK ? I went through some other tutorials of others SDKs such as Facebook PHP SDK. PHP SDK allows to create event as a fan page, but in case of C# SDK the creating event doesn't give any results.

(OAuthException) (#15) The method you are calling must be called with an app secret signed session

旧城冷巷雨未停 提交于 2019-11-30 09:22:07
问题 I'm trying to add Test Users to my Facebook app so I could better test the Request dialog and check if I could retrieve the tracking information. But I keep getting the error in the title of this question. Here's my code: [CanvasAuthorize] public ActionResult Add() { var fb = new FacebookWebClient(FacebookWebContext.Current); dynamic result = fb.Post(string.Format("{0}/accounts/test-users", FacebookWebContext.Current.Settings.AppId), new { installed = false}); return Content(result.ToString()

C# help required to Create Facebook AppSecret_Proof HMACSHA256

社会主义新天地 提交于 2019-11-30 08:54:53
Facebook requires that I create a appsecret_proof: https://developers.facebook.com/docs/graph-api/securing-requests And I have done this using the following code: public string FaceBookSecret(string content, string key) { var encoding = new System.Text.ASCIIEncoding(); byte[] keyByte = encoding.GetBytes(key); byte[] messageBytes = encoding.GetBytes(content); using (var hmacsha256 = new HMACSHA256(keyByte)) { byte[] hashmessage = hmacsha256.ComputeHash(messageBytes); return Convert.ToBase64String(hashmessage); } } Everything looks fine for me, however facebook says that the appsecret_proof is

Facebook Authentication and strange redirect behaviour

青春壹個敷衍的年華 提交于 2019-11-30 03:26:32
问题 I'm currently testing an OAuth implementation of facebook connect using http://facebooksdk.codeplex.com. I've got a FacebookController with 2 simple actions called LogOn and CallBack . Everything works fine and the user is logged correctly into my system. The problem is when the CallBack action is called, something strange happens that makes a simple return Redirect(loggedUrl); redirecting to the correct logged url but ending with the following characters: #_=_ It appears that the Facebook