facebook graph api - How to link a review from FB API to a page? -
i using fb webhooks reviews of page, gives data in following format { "rating": 5, "reviewer_id": "1286740178038617", "reviewer_name": "souvik das", "comment_id": null, "review_text": "lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ", "item": "rating", "verb": "add", "created_time": 1501152301, "open_graph_story_id": "1441952429184057" }
the problem here 'open_graph_story_id' referenced page data coming from, page data need access token of particular page. have thousands of page in db, therefore impractical employ brute-force approach.
this data recived fb webhook ver 2.9 subcribe " rating":
{ "entry": [ { "changes": [ { "field": "ratings", "value": { "rating": 5, "reviewer_id": "975746312528574", "reviewer_name": "trung nguyễn văn", "comment_id": null, "review_text": "hay lắm", "item": "rating", "verb": "add", "created_time": 1501234151, "open_graph_story_id": "1011062825663589" } } ], "id": "109934616337310", "time": 1501234153 } ], "object": "page"
}
in this, use id ( it's page_id) , find on db access_token.
Comments
Post a Comment