facebook-c#-sdk

FB.UI method: send display : 'popup' keeps looping in IE

南楼画角 提交于 2019-12-11 15:19:07
问题 I have facebook iFrame app which is being displayed in company page. On same iframe app i have invite button where we open FB.UI send method to open invitation dialog. For some reason since last week, my send window is not getting closed. I used fiddler to see what is happening and noticed that following following URL keeps looping. This happens only in IE, works fine in all other browsers. https://s-static.ak.fbcdn.net/connect/xd_proxy.php?version=3#cb=f352b316971395&origin=http%3A%2F%2Fqa

How to increase the request timeout?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 13:59:08
问题 How do I increase the TimeOut for Get or GetTaskAsync? (Using Facebook C# SDK 6) Seems like they have a timeout of 15 seconds. 回答1: Use FacebookClient.HttpWebRequestFactory. Since it is hidden from intellisense you might not see it in VS depending on your settings. /// <summary> /// Http web request factory. /// </summary> [EditorBrowsable(EditorBrowsableState.Never)] public virtual Func<Uri, HttpWebRequestWrapper> HttpWebRequestFactory { get; set; } You might want to do something like this.

Authenticate user serverside from stand alone application

≯℡__Kan透↙ 提交于 2019-12-11 12:26:27
问题 We have a separate app, a completely stand alone site. We use facebook for simplified login. We do the following right now show fb login authenticate user with fb javascript create our own account in our db and link it with their fb id. all that works great. But now the user goes to a new computer, he first visits fb and logs in. He then goes to our site. Since we are pre-approved before we want to automatically log the user in with our own account. So, simple question, how can i serverside

Unable to get long lived expiration token

十年热恋 提交于 2019-12-11 09:56:52
问题 I use Facebook C# SDK v 6 and enabled "Remove Offline Access" on my application settings and after login and get the access token, I am trying to exchange for long lived token(60days one) I am unable to get it as both tokens expiration is with in 24 hrs. Here is my code For log in to Facebook private const string Scope = "publish_stream,manage_pages"; FacebookClient _fb = new FacebookClient(); var fbLoginUrl = _fb.GetLoginUrl( new { client_id = AppId, client_secret = Appsecret, redirect_uri =

Facebook v2.0 Login with C# facebook sdk

帅比萌擦擦* 提交于 2019-12-11 08:14:59
问题 It looks like C# facebook SDK (https://github.com/facebook-csharp-sdk/facebook-csharp-sdk) still uses Login v1.0: FacebookClient.OAuthResult.cs: public partial class FacebookClient { ... public virtual Uri GetDialogUrl(string dialog, object parameters) { ... sb.AppendFormat(isMobile ? "https://m.facebook.com/dialog/{0}?" : "https://www.facebook.com/dialog/{0}?", dialog); } } My question is: Will it be updated to https://www.facebook.com/v2.0/dialog/oauth? Thanks, Yury 回答1: There is an active

Convert Dynamic Type to List

懵懂的女人 提交于 2019-12-11 07:04:23
问题 I am using the Facebook C# SDK to get data. I want to use parallel.foreach but cannot use it - instead, an error occurs: Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type So is there any way I can convert data retrieved to a list? dynamic friends = app.Get("me/friends"); Parallel.ForEach(friends.data, friendsData => { Interlocked.Increment(ref infoCount); LoadFriends(friend, infoCount); }); 回答1:

Facebook UserName WPF

偶尔善良 提交于 2019-12-11 06:57:56
问题 Its very simple question, I'm new to this and I can't understand the problem , I am trying to get the user name and display it in a label , when i try this code to get the access token it doesn't enter the condition : it enters the event of ( browser_navigated ) but not the Conditions in , anyone knows whats the problem ? private void webBrowser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e) { FacebookOAuthResult result; if (FacebookOAuthResult.TryParse(e.Uri, out

How to post as application to facebook wall, using Facebook C# SDK?

只谈情不闲聊 提交于 2019-12-11 06:21:38
问题 This is my very first try using this SDK, so be gentle with me. I did this: var fbWebContext = FacebookWebContext.Current; if (fbWebContext.IsAuthorized()) { // post as application var fb = new FacebookOAuthClient { AppId = "205378862824897", AppSecret = "4deb72e26c22415fe00e44028b401114" }; dynamic result = fb.GetApplicationAccessToken(); var appAccessToken = result.access_token; Dictionary<string, object> parameters = new Dictionary<string, object>() { {"description", "Testbeskrivning"}, {

Permissions for application

主宰稳场 提交于 2019-12-11 06:03:47
问题 I set User & Friend Permissions on my application, to get user email on website. I get this info when I click Preview Login Dialog : THIS APP WILL RECEIVE: Your basic info Your email address (xyz@xyz.com) Your birthday Your relationship details Your photos when I tried to log in on my website, application needs only this information: THIS APP WILL RECEIVE: Your basic info Why? Why doesn't the main application have the same permissions as the preview? Regards EDIT: I'm using Auth from this

How to read/send private messages with the Facebook C# SDK?

限于喜欢 提交于 2019-12-11 05:49:07
问题 I am starting with the Facebook C# SDK. How do I deal with messages in the official SDK documentation? How do I read and send messages? Is there any tutorial? 回答1: Facebook does not allow the SDK to send private messages to prevent misuse by spammers 回答2: To get access to messages (the chat ones) u have to have the read_mailbox extended permission (i think) and do like: string facebookToken = "your facebook token here"; var client = new FacebookClient(facebookToken); dynamic result = client