问题
I used the Open Graph to define a custom object that has a plethora of meta tags.
When I use the Object Debugger / URL Linter (found here: https://developers.facebook.com/tools/debug) and input my page URL that has the appropriate meta tags, Facebook scrapes my page exactly as expected, returning an object with all my meta-data as well as a unique facebook ID. This is what the Object looks like:
{
"url": "http://mysite.com/8/the-dali-lama-returns",
"type": "mysite:event",
"title": "The Dali Lama Returns",
"image": [
{
"url": "http://images.mysite.com/4f713f5e-cdd1-4b67-8f66-5ca139f24e73"
}
],
"description": "The Dali Lama will speak, and we will listen.",
"site_name": "mysite",
"data": {
"when": "Thu 3:30PM, Jun 28",
"geolocation": {
"latitude": 34.08536,
"longitude": -118.273994
},
"start": "44461-10-20T12:00:00+0000",
"category": "literary",
"id": 8,
"venue": {
"street_address": "1130 Westerly Terrace",
"locality": "Los Angeles",
"region": "CA",
"postal_code": "90026"
}
},
"updated_time": "2012-03-17T01:48:51+0000",
"id": "1015073609xxxxxxx",
"application": {
"id": "478xxxxxxx",
"name": "Mysite",
"url": "https://www.facebook.com/apps/application.php?id=478xxxxxxx"
}
}
I then run into two problems:
1) "Likes" can't be established with my open graph object.
When I "like" my page using the "Like" plugin that I've dropped on it, the "likes" connection isn't established with the Object shown above, but instead what appears to be a newly created object which has a limited set of meta-data.
Specifically, looking at "me/likes", the ID that is shown for the page I just liked returns the following object (using this query: graph.facebook.com/{like_id}:
{
"id": "17678692xxxxxxx",
"name": "The Dali Lama Returns",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/161984_176786925772923_6855xxxxxxx.jpg",
"link": "http://mysite.com/8/the-dali-lama-returns",
"likes": 1,
"app_id": 478xxxxxxx,
"category": "Unknown",
"is_published": true,
"description": "The Dali Lama will speak, and we will listen.",
"about": "The Dali Lama will speak, and we will listen.",
"can_post": true
}
So my first question: Why is the likes connection not established with my original object shown at the top? and instead made with this new, limited object?
2) Object Debugger & Graph API return a different Object for the same URL
Adding to my confusion on this, if I do the following query:
https://graph.facebook.com/http://mysite.com/8/the-dali-lama-returns
The second, limited object is returned.
And then once again, if I go to the Object Debugger and enter "http://mysite.com/8/the-dali-lama-returns" as my url (as I did initially), the first, complete object is returned.
Why are these two queries returning different Objects?
3) Last comment/question - news feed displays limited content...
As you would expect, when my page like appears in my news feed, it appears with only a "title", "description" and "image" versus with the complete set of information that I designed it to appear with using the Open Graph wizard. For example the When, Where information is left off.
How can I get the news feed item I designed using the Open Graph tutorial to appear in the news feed when someone likes my page?
来源:https://stackoverflow.com/questions/9746767/object-debugger-and-graph-api-return-different-objects-for-same-url-likes