Facebook feed issue with RSS, JSON and XML


(Jamie Smith) #1

Hello,

 

I'm trying to get a feed of a Facebook page, e.g. https://www.facebook.com/feeds/page.php?format=json&id=7270241753, but am having problems getting Matrix to accept the available formats that FB offers: json, rss20 and atom10.

 

I've created relevant Data Source assets in Matrix, but they are returning errors. With JSON, for example, I'm getting a MySource Warning syntax error, even though the JSON is actually valid.

 

Any thoughts on this?

 

Thanks in advance.


(Nic Hubbard) #2

What you are trying to do won't work. Try using curl and getting the contents of your URL, and you will see what it is really getting. It is actually returning a Facebook Syndication Error.

 

You need to use the Facebook Graph API instead: http://stackoverflow.com/questions/11926659/get-facebook-page-feed-as-json-with-jquery


(Bart Banda) #3

I ended up using an XML data source asset with their RSS feed. So example RSS link: https://www.facebook.com/feeds/page.php?id=%%id%%&format=rss20 

 

Try putting that into an XML data source asset and you should get some results. 

 

I set the root tag to "item" and the tag names to "title,link" and that is giving me results. 


(Jamie Smith) #4

Thank you, both, for responding. I've checked and the XML feed works for me too, but the actual feed I'm using (not the example one in my original post) must have some character in it that's messing up the interpretation. I will look into it further, but I appreciate the leads.