facebook-c#-sdk

How to Handle Facebook Application Requests?

て烟熏妆下的殇ゞ 提交于 2019-12-19 02:57:07
问题 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 ? 回答1: i found the solution i start ask for permission on my application canvas page and

getting user profile picture using facebook c# sdk from codeplex

梦想的初衷 提交于 2019-12-18 21:50:19
问题 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[

getting user profile picture using facebook c# sdk from codeplex

匆匆过客 提交于 2019-12-18 21:49:22
问题 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[

fql join; can i join two tables with FQL?

你离开我真会死。 提交于 2019-12-18 17:07:46
问题 I have the following FQL I want to join with user table to add name field! How can I do that?After I test making normal left join I got error message (601 join not possible with FQL). How can I join and add name field???? <!DOCTYPE html> <html> <body> <div id="fb-root"></div> <a href="#" onclick="getPhotos();return false;">Get Photos</a> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({ appId: 'yourAppID', status: true, cookie: true, xfbml : true }); function

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

吃可爱长大的小学妹 提交于 2019-12-18 16:59:39
问题 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. 回答1: 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

C# help required to Create Facebook AppSecret_Proof HMACSHA256

核能气质少年 提交于 2019-12-18 13:08:58
问题 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

C# help required to Create Facebook AppSecret_Proof HMACSHA256

醉酒当歌 提交于 2019-12-18 13:08:06
问题 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

How do I check if .Post has send successfully in Facebook C# sdk?

我的梦境 提交于 2019-12-18 09:28:08
问题 I try send the message using the followingcode: //... FacebookClient fbClient = new FacebookClient(appId, appSecret); fbClient.AccessToken = "..."; string to = "user id"; dynamic result = fbClient.Post(String.Format("{0}/feed", to), parameters); but how I can know if the menssage has send to user successfully? what's the returns on case success/erros? I not found some details in the documentation of facebook-sdk-api for C#. .NET version: v4.0.30319 Facebook Assembly version: 5.2.1.0 Thanks in

Authentication using Facebook C# SDK

删除回忆录丶 提交于 2019-12-18 08:35:33
问题 How can I authenticate with a username(email) and password? The samples provided just calls "authorizer.Authorize()" without credentials (which simply throws an "Invalid URI" format exception for me). Do I need an accessToken and if so, how do I get one? 回答1: You cannot authenticate with a username and password. You must use OAuth to authenticate a user. Facebook does not permit application developers to collect usernames and password from users. 回答2: This tutorial should help you: Getting

Authentication using Facebook C# SDK

坚强是说给别人听的谎言 提交于 2019-12-18 08:34:13
问题 How can I authenticate with a username(email) and password? The samples provided just calls "authorizer.Authorize()" without credentials (which simply throws an "Invalid URI" format exception for me). Do I need an accessToken and if so, how do I get one? 回答1: You cannot authenticate with a username and password. You must use OAuth to authenticate a user. Facebook does not permit application developers to collect usernames and password from users. 回答2: This tutorial should help you: Getting