Facebook fan page: Is there a way to get description of a Facebook fan page using Graph API

StackOverflow https://stackoverflow.com/questions/4611288

문제

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

도움이 되었습니까?

해결책

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 !

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top