Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4589744
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:07:48+00:00 2026-05-21T22:07:48+00:00

I am trying to update the bookmark count field with the SDK but have

  • 0

I am trying to update the bookmark count field with the SDK but have not had any success yet.

Can somebody tell me what classes I need to instantiate to do something similar to the following link:

http://developers.facebook.com/blog/post/464

Note:

The link demonstrates how to set the bookmark count and delete it. I would like to be able to do the same with the SDK, any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:07:49+00:00Added an answer on May 21, 2026 at 10:07 pm

    To do this, first you need to get you app’s access token:

        private string GetAppAccessToken() {
    
            var fbSettings = FacebookWebContext.Current.Settings;
    
            var accessTokenUrl = String.Format("{0}oauth/access_token?client_id={1}&client_secret={2}&grant_type=client_credentials",
                "https://graph.facebook.com/", fbSettings.AppId, fbSettings.AppSecret);
    
            // the response is in the form: access_token=foo
            var accessTokenKeyValue = HttpHelpers.HttpGetRequest(accessTokenUrl);
            return accessTokenKeyValue.Split('=')[1];
        }
    

    A couple of things to note about the method above:

    • I’m using the .Net HttpWebRequest instead of the Facebook C# SDK to grab the app access_token because (as of version 5.011 RC1) the SDK throws a SerializationException. It seems that the SDK is expecting a JSON response from Facebook, but Facebook returns the access token in the form: access_token=some_value (which is not valid JSON).
    • HttpHelpers.HttpGetRequest simply uses .Net’s HttpWebRequest. You can just as well use WebClient, but whatever you choose, you ultimately want to make this http request:

      GET https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&grant_type=client_credentials HTTP/1.1
      Host: graph.facebook.com

    Now that you have a method to retrieve the app access_token, you can generate an app request as follows (here I use the Facebook C# SDK):

    public string GenerateAppRequest(string fbUserId) {
        var appAccessToken = GetAppAccessToken();
        var client = new FacebookClient(appAccessToken);
        dynamic parameters = new ExpandoObject();
        parameters.message = "Test: Action is required";
        parameters.data = "Custom Data Here";
    
        string id = client.Post(String.Format("{0}/apprequests", fbUserId), parameters);
        return id;
    }
    

    Similarly, you can retrieve all of a user’s app requests as follows:
    Note: you probably don’t want to return “dynamic”, but I used it here for simplicity.

       public dynamic GetAppRequests(string fbUserId) {
            var appAccessToken = GetAppAccessToken();
            var client = new FacebookClient(appAccessToken);
    
            dynamic result = client.Get(String.Format("{0}/apprequests", fbUserId));
            return result;    
        }
    

    I hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to update my DataGrid but unfortunately not able to! My application
I'm trying update some values for some hidden input boxes, but I'm not very
Im trying to update a simple model in MVC,but its not working,it throws an
I trying to update a model on a callback but the validation is causing
I`m trying to update time in datetime field as UPDATE table_name SET col_name=to_DATE('04/02/2012 00:12:00','MM/DD/YYYY
Trying to update a table on a linked server (SQL 2000/2005) but my server
Trying to update a table so that a field has it's contents changed to
i'm trying to update my sencha app from Extjs2.0 to ExtJS 3, but i'm
I am trying to update a datagridview and a chart. I have a class
Im trying to update at PropertyListView after i have deleted an entry via Ajax,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.