facebook-c#-sdk

wap dialogs deprecated on july 2012

自闭症网瘾萝莉.ら 提交于 2019-12-24 11:28:00
问题 I've just tried the Facebook C# SDK v6.0.16 from earlier this week in a WP7.1 (Mango) app. The goal is to post a photo on the wall of a user through a facebook app, so I started to implement login to get an access token. Bad surprise, I can't get a combination that works fine: using the desktop page give a very small display on the phone screen using the mobile page is fine, however gives the following error after login is successful: "An error occurred with YOURAPP. Please try again later.

OAuthException with post action only in IE

我是研究僧i 提交于 2019-12-24 09:48:48
问题 In my fb application I calling a post action $.post("http://localhost:3435/Home/Try?id=123&x=1"); My action [HttpPost] public ActionResult Try(string id, int x) { //post on my wall var client = new FacebookWebClient(); dynamic parameters = new ExpandoObject(); //... dynamic result = client.Post("me/feed", parameters); //... } In FF and chrome this works as expected. Posts to wall. But in Internet Explore I get an exception. (OAuthException) An active access token must be used to query

What is the best way to get the UserId of the current user

谁说我不能喝 提交于 2019-12-24 08:47:07
问题 How to get Face Book Current UserId . I would like to avoid asking for permissions since my users are just browsing and i only want to see if they have done this before. 回答1: using Facebook c# sdk: string signedRequest = Request.Form["signed_request"]; var DecodedSignedRequest = FacebookSignedRequest.Parse(Facebook.Web.FacebookWebContext.Current.Settings.AppSecret, signedRequest); dynamic SignedRequestData = DecodedSignedRequest.Data; accessToken = (String)SignedRequestData.oauth_token; var

How to open “Go to app” pop up on facebook page tab's checkbox click

瘦欲@ 提交于 2019-12-24 08:03:11
问题 Here is my facebook page When a user click on a Fitbook Contest second tab then it will first force a user to like a page and then allow to use my application. But To access my app, First user needs to allow an appication then only my app will be accessed by user. I am doing this coding in a c#.net. Here is my code. TestFB.aspx.cs Code : public partial class TestFB : System.Web.UI.Page { private static string access_token = ""; protected string form_url = ""; public static string FacebookID =

Facebook C# SDK installation from Nuget not working

浪子不回头ぞ 提交于 2019-12-24 07:15:57
问题 Coding Platform: ASP.NET WebForms4.0 VB Installed Facebook and FacebookWeb and when I run the application. I get this error Could not load file or assembly 'Facebook.Contracts, Version=5.0.25.0, Culture=neutral, PublicKeyToken=58cb4f2111d1e6de' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) What could be wrong? 回答1:

How to use [Authorize] and [FacebookAuthorize] in mvc3 web app using mixed membership

牧云@^-^@ 提交于 2019-12-23 04:33:21
问题 We are using our first website that will give the users the choice of either using our standard .net membership provider or facebook using the facebook c# sdk (awesome sdk by the way!). We have handled most of it but need to restrict access to certain areas based on the user being logged in or not. In the past with pure .net membership we used the [Authorize] attribute on the method, however if the user is logged in using facebook then this is false. I know I can try to roll our own

WP8 - Facebook Login Issue

假装没事ソ 提交于 2019-12-22 10:39:37
问题 I am trying to authenticate a user on Facebook using the Facebook C# SDK on Windows Phone 8. To do so I am following the code here: FacebookLoginPage.xaml.cs But the problem I am facing is that, whenever I input my username and password into the dialog that opens to authenticate the user, I just get the following page: After this, my program does not redirect to the Landing page which is a separate view. The other solutions I have seen that suggest hiding the WebView are not applicable since

Facebook C# SDK get user language/region

不问归期 提交于 2019-12-22 09:47:00
问题 I'm using the Facebook C# SDK. How can I get language of the user, so I can display all messages accordingly without forcing the user to choose his preferred language manually? 回答1: If you are developing a web app, then you can use Accept-Language Http header to detect the language EDIT 1 For winforms application, you can use System.Globalization.CultureInfo.CurrentCulture.Name . EDIT2 To get the locale using FB REST API : dynamic fbResult = new Uri("https://graph.facebook.com/AngelaMerkel

Facebook Login - Windows 10 UWP - Desktop

孤者浪人 提交于 2019-12-22 06:37:17
问题 I am building a new Universal Windows 10 UWP App, and trying to do a Facebook login. On Facebook, I have set the Windows App section of my app to have the identifier of my app: Windows : s-1-15-xxxxxxxxxxxx Windows Phone : fef49b712e5a843cbfeb0c9d780423fc (Not the actual one) In the package manifest file, I have added the protocol of: msft-fef49b712e5a843cbfeb0c9d780423fc Which means I set my redirect_uri parameter to: msft-fef49b712e5a843cbfeb0c9d780423fc://authorize When running on a phone

Logging out of Facebook C# SDK on WP7

我的未来我决定 提交于 2019-12-22 05:18:25
问题 I am trying to add a feature for logging out, which is called in the click event of a ApplicationBarMenuItem, following the instructions on this blog This is what my code looks like: var oauth = new FacebookOAuthClient(); var logoutParameters = new Dictionary<string, object> { { "next", "http://www.facebook.com" } }; var logoutUrl = oauth.GetLogoutUrl(logoutParameters); LayoutRoot.Children.Add(FacebookLoginBrowser); FacebookLoginBrowser.Navigate(new Uri(logoutUrl.AbsoluteUri, UriKind.Absolute