problem about facebook-c#-sdk-Collection of common programming errors


  • Richard
    facebook-c#-sdk
    I have been successful in creating test users for my console-based application using: public dynamic CreateTestUser(string name) {return client.Post(APP_ID + “/accounts/test-users?installed=true&name=” + name + “&permissions=read_stream”); }However, now I’m trying to delete the users that I have created and have not had success.One method I’ve tried is the following:FacebookClient client = new FacebookClient(APP_ID, APP_SECRET); dynamic result = client.Delete(userId);Another method I’ve

  • Philip Danks
    c# facebook facebook-graph-api sdk facebook-c#-sdk
    I am getting the following error when trying to run code from http://facebooksdk.blogspot.co.uk/2011/04/facebook-groups.htmlThe error is “Invalid CastException Was Unhandled” and “Specified Cast Is Not Valid”I am using the Facebook C# SDK and I am using the following code…public Dictionary<string, string> GetGroups(){string accessToken = _accessToken;FacebookClient facebookClient = new FacebookClient(accessToken);JsonObject resul = facebookClient.Get(“https://graph.facebook.com/me/groups

  • jovem
    c# wpf facebook windows-phone-7 facebook-c#-sdk
    I’m new in these things and I’ve been testing the api … and came to me a situation that is:if the user changes the password of Facebook the Access token is renewed … and try to post the API Launches an exception and the application crashes… how to resolve this situation?try {FacebookApp app = new FacebookApp(FacebookToken);var args = new Dictionary<string, object>();args[“message”] = “hi”;args[“caption”] = “appcaption”;args[“description”] = “appdescription”;args[“name”] = “appname”;a

  • loyalpenguin
    c# .net windows-phone-7 facebook-c#-sdk
    I recieve this exception when I try to run the sample application for WP7 that comes with the Facebook C# SDK:File or assembly name’Microsoft.Contracts, Version=1.0.0.0,Culture=neutral,PublicKeyToken=736440C9B414EA16′, orone of its dependencies, was notfound.It occurs at this part in code:// Constructorpublic MainPage(){InitializeComponent();_fbClient = new FacebookClient();FacebookLoginBrowser.Loaded += new RoutedEventHandler(FacebookLoginBrowser_Loaded);}Not sure what this means, as this is th

  • bratsche
    facebook facebook-graph-api facebook-c#-sdk
    Developing a WP7 app, and I’m trying to post something to the user’s feed. We have all this working on iPhone already, and we have a test account created already. With the iPhone it’s able to post to our test user’s page.I’m trying to use the Facebook C# sdk to do the same thing, using the same account. I can successfully login to the test user’s account and obtain the AccessToken. When I login, the extended permissions I request from the user are “read_stream”, “publish_stream”, “publish_ch

  • Bo Persson
    asp.net facebook updatepanel facebook-c#-sdk
    I have a facebook app with an asp.net update panel. It works fine when running outside facebook, however once I run the app in Facebook the update panel stops working. I check the javascript console and found the following errors were occuring.Uncaught Sys.WebForms.PageRequestManagerParserErrorException:Sys.WebForms.PageRequestManagerParserErrorException: The messagereceived from the server could not be parsed. Common causes for thiserror are when the response is modified by calls to Response.Wr

  • Kassem
    jquery ajax facebook jquery-ajax facebook-c#-sdk
    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/251878http://facebooksdk.codeplex.com/discussions/250820I 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(R

  • oteal
    facebook-c#-sdk
    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

  • Max Favilli
    c# javascript facebook facebook-c#-sdk
    We are developing a web app (http://beta.dammela.it) which use both FB Graph api server side, FB Javascript SDK and social plugins.The integration with FB is deep and we would like to detect when a user visiting our website is behind a proxy which block all traffic to Facebook properties (like in some working place).If we could detect he is blocked we could give him/her some hints, help, explanation and some alternative methods to login and interact with the application.But I can’t figure out ho

  • Chris
    asp.net facebook facebook-c#-sdk
    I’m trying out the facebook c# SDK (v4.0.2) and am experiencing a 404 error when facebook tries to redirect back to the redirect handler for the SDK. The resulting URL is:http://localhost:9152/facebookredirect.axd/elserdemo/Default.aspx?session={%22session_key%22%3A%222.GJsQK_BkApJNH8TncuFHpQ__.3600.1291665600-678938033%22%2C%22uid%22%3A%22678938033%22%2C%22expires%22%3A1291665600%2C%22secret%22%3A%22dnmnVip8JJ31rHUs2byKeQ__%22%2C%22base_domain%22%3A%22localhost%22%2C%22access_token%22%3A%22133

  • Matt B
    c# facebook facebook-c#-sdk
    I’m driving myself to despair trying to get an album added to a facebook page using the C# SDK..I think my code is OK as I can successfully create an album on my own profile page through the SDK and API. So, I expect something’s getting confused with my access tokens and permissions etc.My c# code is here:string accessToken = “TOKEN HERE”;FacebookClient facebookClient = new FacebookClient(accessToken); var albumParameters = new Dictionary<string, object>(); albumParameters[“message”] = “ne

  • JCPhlux
    silverlight facebook-c#-sdk facebook-credits
    I have been able to get my Silverlight App connected to Facebook and get authenticated.I am trying to pull the users credits balance into my Silverlight app the documentation at developers.facebook.com/docs/creditsapi has a one line example that references the Facebook Credits Sample application from Githu that is writen in php. looking at the file from the Githu example facebookapi_php5_restlib.php and the documentation Converting Facebook PHP examples I should be able to get the balance with s

  • Afnan Bashir
    c# facebook-c#-sdk
    I am trying to get facebook wall but I am having issues with JSON Nested structure.following is my code so farvar wall = (JsonObject)fb.Get(“me/feed”); List<FBWall> myWall = new List<FBWall>(); foreach (var obj in (JsonArray)wall[“data”]) {FBWall myWall = new Wall();myWall.Id = (string)(((JsonObject)obj)[“id”]);}actual string in wall is coming something like this {“data”:[{“id”:”576376893_10150590188751894″,”from”:{“name”:”Afnan Bashir”,”id”:”576376893″},”story”:”\”how are you man???

  • Richard Blevins
    facebook-c#-sdk
    Please give a sample of how to post to a group wall using the C# Facebook SDK found at this location https://github.com/facebook-csharp-sdk/facebook-csharp-sdk . Below is just a few lines of relevant code. An fb client is created, parameters filled in (not shown), and a fb.post call is made. For my attempt to post to a group wall, all I did was change the “me/feed” to “groupId/feed”. I could probably figure out what is wrong but the Facebook error provides no information. The error returned

  • Robert Harvey
    facebook-c#-sdk photos
    I’m trying to use the C# Facebook SDK to post a photo to a page that I am a content creator for.dynamic parameters = new ExpandoObject();parameters.message = txtMessage.Text;parameters.source = new FacebookMediaObject{ContentType = “image/jpeg”,FileName = Path.GetFileName(ofd.FileName)}.SetValue(File.ReadAllBytes(ofd.FileName));When I try a path like the following it gives me an error that says (OAuthException – #2500) Unknown path components: /ALBUM_ID/photosfb.PostTaskAsync(“PAGE_ID/ALBUM_ID/p

  • J. Steen
    c# facebook facebook-javascript-sdk facebook-c#-sdk
    EDIT: It seems that I can only make 2 posts per day. If I remove the Logout step I can post as much as I want.I’ve looked at many other “An error occurred. Please try again later” threads on here and haven’t seen exactly my issue so I feel it does warrant its own thread.I have an app thats sole purpose is to schedule and post messages to Facebook. This app has been working great. As flawless as a FB app can run. I was asked to force the user to relog in every post for security reasons so the fi

  • Richard Ev
    c# facebook-graph-api facebook-c#-sdk
    In my Facebook app I am seeing an error from the Facebook SDK for some users when getting their feed (using me/home?limit=1000&fields=from.fields(id,name),likes.fields(id),comments.fields(from.fields(id))).The error is:Facebook.FacebookApiException: (Exception – #0) Unknown identifier, 0_xxxxxxxat Facebook.FacebookClient.ProcessResponse(HttpHelper httpHelper, String responseString, Type resultType, Boolean containsEtag, IList`1 batchEtags)at Facebook.FacebookClient.Api(HttpMethod httpMethod,

  • DVD
    facebook-graph-api facebook-like facebook-c#-sdk
    I’m developing an app, and when I try to create a like on a comment (of a page post) I always get the following error:{“error”: {“message”: “An unknown error has occurred.”, “type”: “OAuthException”, “code”: 1} }My request is:post 530880543615557_5607698/likesI tried the page access token and the user access token and always gets this error. Whe I try to like normal comments from for instance my timeline it works fine.I tried via code and Graph Api explorer and got the same error on both.Any tho

  • Attri
    windows-phone-7.1 facebook-c#-sdk
    I am creating a windows Phone 7.1 App using Facebook SDK version 6.0.10.0 . I am setting facebook media object value through stream object my code is FacebookMediaStream media = new FacebookMediaStream { ContentType = “image/jpeg”, FileName = “test Image” };media.SetValue(_imgStream); IDictionary<string, object> parameters = new Dictionary<string, object>();parameters[“message”] = “Test photo ” + DateTime.Now.ToString();parameters[“source”] = media; fb.PostAsync(“me/photos/”,

  • Alex
    windows-phone-7 facebook-c#-sdk
    I have a WP7 app using facebook SDK 5.4.1. I try to upload a photo to Facebook, but always get an error message “(OAuthException) (#1) An unknown error occurred”.Here is my code:var app = new Facebook.FacebookApp(AuthKey); var parameters = new Dictionary<string, object>{{“message”,”test”},{“description”,”test2″}}; FacebookMediaObject media = new FacebookMediaObject {FileName = “1”,ContentType = “image/jpeg” }; WriteableBitmap wb = new WriteableBitmap(0, 0).FromResource(“/Images/thumbnails/

Originally posted 2013-11-27 05:09:21.