facebook-c#-sdk

No access token facebook application authentication

拟墨画扇 提交于 2019-12-06 15:59:23
问题 I'd like to show my facebook wall posts on my website. So i don't want to authenticate users with a dialog, to grant them some rights, i just want to show him my wall with comments (no ability to add comment just read only access). As i know there isn't unexpired tokens now so is it possible to access just my data without requesting token every time it expires? I'm using asp.net mvc but i think this sultion doesn't depend at platform at all. 回答1: You should: Make your Facebook Posts public

fb.Get() doesn't exist?

折月煮酒 提交于 2019-12-06 15:53:38
I have the code below that I got from off of Prabir's Blog (codeplex documentation) and the fb.get() method does not exist...I was able to test all the way up to authentication where it takes me to the fb login page and now I am trying to do the fb.Get("/me"); I am new to this and am just following the guide... private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e) { string appId = "xxx"; string[] extendedPermissions = new[] { "publish_stream", "offline_access" }; var oauth = new FacebookOAuthClient { AppId = appId}; var parameters = new Dictionary<string, object> { {

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

天大地大妈咪最大 提交于 2019-12-06 15:30:44
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 dataannotation extension. Or I could just manually try one or the other. I know there is also the

How to login to facebook using the Facebook C# SDK

核能气质少年 提交于 2019-12-06 13:58:56
I'd like to post messages to a group wall without asking user for login information -I'd like to do it programmatically, I can use my user/pass if necessary-. ¿Is it possible to do this without showing the user the login screen? Note: I'm working with Facebook C# SDK (http://facebooksdk.codeplex.com/) under ASP.NET. Thanks No you cannot do this. Facebook prevents this sort of behavior to prevent spamming on peoples walls from fake accounts. You will always have to go through the initial login procedure AT LEAST ONCE. However, if you get an offline access token for someone then you could

get an access token using Facebook C# SDK

二次信任 提交于 2019-12-06 11:55:20
Hi i am using the following code to get access token from facebook using C# SDK var fb = new FacebookClient(); dynamic result = fb.Get("oauth/access_token", new { client_id = "clientId", client_secret = "clientSecret", redirect_uri = "redirectUri", code = "code" }); return result.access_token; the above code works perfect most of the time but some times i gets this error (OAuthException - #100) Invalid verification code format. how to fix this problem?? What is your project type : WinForms , WPF , ASP.NET ? if you are working with WinForms or WPF , you have to get the access_token form the

Facebook SDK for .NET Login Button, logout code

*爱你&永不变心* 提交于 2019-12-06 09:17:04
问题 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?? 回答1: 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

Creating facebook business page is POSSIBLE but how?

时间秒杀一切 提交于 2019-12-06 07:53:33
问题 I researched a lot on this subject and on everywhere I've seen, it is stated that creating page with facebook api is not possible. There is one application, Pagemodo, which manages that and I don't know how. So how does it manage to create facebook page automatically? Am I missing something here? 来源: https://stackoverflow.com/questions/16359406/creating-facebook-business-page-is-possible-but-how

Architecture for testable iframe application - Best practices with Facebook C# SDK

女生的网名这么多〃 提交于 2019-12-06 05:43:37
问题 I am struggling in seting up a the basic architecture for my ASP.NET MVC Facebook iframe application which is running on Windows Azure . I know that there are some basic samples, how to use the toolkit. But it seems that for big application i need a really good architecture to begin developing with. Also a lot of other developers seem to struggle in setting up this kind of basic architecture for an iframe ASP.NET MVC application, too. So why not gather all available information here and set

Facebook C# SDK get user language/region

安稳与你 提交于 2019-12-06 02:04: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? L.B 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?access_token=AAABkECTD......").GetDynamicJsonObject(); Console.WriteLine( fbResult.locale ?? "-" + " > " +

getLoginStatus returns status unknown when trying to logout from Facebook using Facebook JS SDK

白昼怎懂夜的黑 提交于 2019-12-06 01:16:33
问题 I have a localhost website, where I've implemented login via Facebook using Facebook C# SDK. Startup configuration class : public class ExternalLoginConfig { public void ConfigureAuth(IAppBuilder app) { app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); var facebookAuthenticationOptions = new FacebookAuthenticationOptions() { AppId = ConfigSettings.FacebookAppId, AppSecret = ConfigSettings.FacebookAppSecret, Scope = { "email" }, Provider = new