Question

I am trying to work on the description of some pages. I am using Graph API to get the page object. I dont find the description of the page in the page object.

Is there a way to fetch the description, plot outline of a facebook fan page using Graph API?

Language: Java Library used: RestFB

Was it helpful?

Solution

Using the Graph API you can get only the name, category and the number of users who like a page. No description.

If you want to get more info about that page you have available the page table. Using this you can get not only the info available through API, but many others including picture, type, website, company overview, mission, products etc.

In order to query this table you have to use FQL, and a query might look like this:

SELECT pic, type, website, company_overview, mission, products, location FROM page WHERE page_id=YOUR_PAGE_ID

Documentation for this table is available here and how to execute FQL queries using your library is available on the page you provided at the end of your question.

Good luck !

OTHER TIPS

please provide here some code then only we can know what problem you have, check your acess_token.

`

"data": [

       ],
       "paging": {
          "previous": "https://graph.facebook.com/fan_page_id/insights?access_token=****&since=...",
          "next": "https://graph.facebook.com/fan_page_id/insights?access_token=****&since=..."
       }
    `

I used restFB to connect to Facebook Graph API. You can download it @ http://restfb.com/

In com.restfb.types.Page source file, add the following line:

@Facebook("description")
private String description;

Also write a getter for description

public String getDescription() {
    return description;
}

Compile the library and you can fetch the description automatically each time you fire a query.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top