facebook-c#-sdk

Passing the signed_request along with the AJAX call to an ActionMethod decorated with CanvasAuthorize

落爺英雄遲暮 提交于 2019-12-04 21:03:06
This is a follow-up to AJAX Call Does Not Trigger Action Method When Decorated With CanvasAuthorize So I found the following links and it seems that this is a common problem: http://facebooksdk.codeplex.com/discussions/251878 http://facebooksdk.codeplex.com/discussions/250820 I tried to follow the advice by prabir but I couldn't get it to work... Here's my setup: I have the following snippet in the page where the button that triggers the whole post to facebook is located: @if (!string.IsNullOrEmpty(Request.Params["signed_request"])) { <input type="hidden" id="signedReq" value="@Request.Params[

Facebook .NET SDK: How to authenticate with ASP.NET MVC 2

会有一股神秘感。 提交于 2019-12-04 18:09:57
I am trying to get the grip on the Facebook SDK and at the same time transitioning from ASP.NET forms to MVC (finally). So please bear with me .. I have created two controller actions: FBLogon is execetued when the user clicks on the FB login button on the form. He is then redirected to the FB login page. Afterwards he gets sent back to the FBAuthorize page, which is supposed to parse the returned url for the access token. I get something like: http://localhost:5000/account/FBAuthorize#access_token=199143326771791|827213759889396d5408fee6-100001815992604|BmYchAOMqSoZ2L0TYgCrtpoKP3M&expires_in

mobile version of Facebook app going into redirect loop

好久不见. 提交于 2019-12-04 18:05:33
I have developed a Facebook app using the C# SDK and it is working fine. Now I want to also enable it on mobiles, so I tried to set the "mobile url" to the same one as my canvas url (which is a cloudapp.net address). However, when I try to access it from a mobile, it seems to go into a redirect loop involving my canvas url, the apps.facebook url and the m.facebook/apps url. Sometimes it goes out of the loop and I get the facebook error message saying : "the mobile version of the app is unavailable because it is misconfigured. It appears to be caught in a redirect loop." I think it may have to

Facebook SDK for .NET Login Button, logout code

前提是你 提交于 2019-12-04 16:55:46
I've used the Login Button Control in the Facebook SDK for .NET in an app and I need to change the Status/state of the login button control from "Logout" to "Login" i.e., I need to logout the user manually through code. How would that be possible?? Use FacebookClient.Logout to generate the logout url. This is just a sample. private void btnLogout_Click(object sender, EventArgs e) { var fb = new FacebookClient(); var logoutUrl = fb.GetLogoutUrl(new { next = "https://www.facebook.com/connect/login_success.html", access_token = _accessToken }); var webBrowser = new WebBrowser(); webBrowser

Facebook Connect (C# SDK) - How to See if User is Authenticated to FB, But Don't Force?

强颜欢笑 提交于 2019-12-04 16:07:11
I'm implementing a single sign on between Facebook Connect and my ASP.NET MVC 3 website, using the Facebook C# SDK. Now, part of the single sign on is: If the user is authenticated to Facebook, but not to my website, see if they are connected in my system and if so, perform a single sign on (using Forms Auth). Now, i don't know how to "see if the user is authenticated". I'm using OAuth for server-side authentication, so i don't want to force them to sign in via the login page, just a silent check. If they're not authenticated, i wont do anything - i'll just wait for them to click the "Connect

Infinite refresh - Getting Started with the Facebook C# SDK

不打扰是莪最后的温柔 提交于 2019-12-04 15:27:08
I made the example in http://csharpsdk.org/docs/web/getting-started , and it works. But the javascript is constantly executing, so he's constantly do a post on the server.. Always invoke the handler who Redirect to About.aspx and codebehind read the name, ID and other user information. form.setAttribute("action", '/FacebookLogin.ashx'); In my MasterPage I have the < div id="fb-root"> and the script code right after the tag < body> (inside the body). And in my Default.aspx I have the button to LogIn. Can you help me? I was having this same issue as well from following the example and my issue

Login to website using Facebook account [closed]

只愿长相守 提交于 2019-12-04 14:23:52
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I want to implement SSO in our current website so that we can login to that website using a Facebook account. Can you please provide the steps which I need to follow to implement it? 回答1: Try with this link https://developers.facebook.com/docs/guides/web/ 回答2: Mixu had

How to get the Page Id in my Facebook Application page

試著忘記壹切 提交于 2019-12-04 14:22:58
问题 I have my application is hosted in FaceBook as a tab and I want to get the page ID when my application is being added to be stored in my logic. How can I get the page ID, I know it is stored in the URL but when I tried to get it from the page as a server variable, I am not getting it even my application is configured as iFrame ? But this is a standard way to get the parent URL. C#: string t= request.serverVariables("HTTP_REFERER"); //doesn't get FB page url even if your app is configured as

Facebook C# SDK - Server flow authentication

若如初见. 提交于 2019-12-04 13:13:32
问题 I am using the Facebook C# SDK installed using NuGet to allow user's to login to my site using Facebook. In all the C# SDK documentation that I've found, the access token was obtained using the JavaScript SDK. I want to do the entire authentication flow server side without using JavaScript SDK. Where can I find good documentation or sample code for the steps I need to follow for complete server side authentication using the Facebook C# SDK? Is there any advantage of combining C# SDK and

Post an object of type Reference

笑着哭i 提交于 2019-12-04 13:00:33
I have had this problem for some time now and I have seen others have it as well. It has to deal with posting your custom objects that you create in Open Graph to post with your application. I am having this problem primarily on all platforms, but right now let's say I am using Android. If someone has accomplished this in C# or on IOS or even in PHP please post your answer. An Example: I have an object that posts a meal to Facebook. Let's say its properties are the following. mealName = "Lunch" mealType = "Vegetarian" mealLocation = "Somewheresville, OH" Now I have another object in my Open