I'm building an app that takes status updates from several Social Media. Already have the Twitter one working like a charm. But now that I have to work with Facebook's Graph API, mysterious things keep popping up. Like the fact that a post contains either a message or a story (not both as far as I know). I haven't managed to find the difference between the two.
I figured it would probably have to do with the type of the post, but it doesn't I found out that the types link, status, photo and video can all contain either a message or a story. Then there's swf which i've only seen with a message.
Can anyone tell me what's the deal here? Is the real only difference that one is a real status update and the other just a 'like' or something similar?
Example JSON:
{
"id" : "<<Some ID>>",
"from" : {
"name" : "<<A Friend>>",
"id" : "<<Some ID>>"
},
"message" : "Maakt zich op voor ronde twee in de presentatiedienst bij #omropfryslan Zometeen tussen vier en zes live!",
"icon" : "https://fbcdn-photos-a.akamaihd.net/photos-ak-snc7/v85006/23/<<Some ID>>/app_2_<<Some ID>>_7567.gif",
"actions" : [{
"name" : "Comment",
"link" : "https://www.facebook.com/<<Some ID>>/posts/<<Some ID>>"
}, {
"name" : "Like",
"link" : "https://www.facebook.com/<<Some ID>>/posts/<<Some ID>>"
}, {
"name" : "@<<A Friend>> on Twitter",
"link" : "https://twitter.com/<<A Friend>>?utm_source=fb&utm_medium=fb&utm_campaign=<<A Friend>>&utm_content=<<Some ID>>"
}
],
"type" : "status",
"application" : {
"name" : "Twitter",
"namespace" : "twitter",
"id" : "<<Some ID>>"
},
"created_time" : "2012-05-29T13:51:01+0000",
"updated_time" : "2012-05-29T13:51:01+0000",
"comments" : {
"count" : 0
}
},
Above has type status and a message. Below has type status and a story.
{
"id" : "<<Some ID>>",
"from" : {
"name" : "<<A Friend>>",
"id" : "<<Some ID>>"
},
"story" : "<<A Friend>> likes a photo.",
"story_tags" : {
"0" : [{
"id" : <<Some ID>>,
"name" : "<<A Friend>>",
"offset" : 0,
"length" : 14,
"type" : "user"
}
]
},
"type" : "status",
"created_time" : "2012-05-29T13:40:42+0000",
"updated_time" : "2012-05-29T13:40:42+0000",
"comments" : {
"count" : 0
}
},
Thanks for the replies, and sorry if I'm being captain obvious!
The difference is pretty basic:
Of course, some apps may confuse the issue by posting status updates that are merely the same thing as stories, this is just because a Status update can consist of practically anything bit of free text at all.
in case anyone is wondering how to deal with this, in my app i basically did the following:
var newPost = ...data.message || ...data.story
in my app I was doing something similar; showing social media feeds on my site but some of them came back as undefined due to them being story instead of message. this way if message is undefined it will fall back to story.
replace the ... with however your response comes back to you ;D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With