lttkgp / R2-D2

Facebook connector for C-3PO
MIT License
7 stars 3 forks source link

Make an API call to <POST_ID>/attachments for posts that do not return the Link property #21

Open mukul-mehta opened 3 years ago

mukul-mehta commented 3 years ago

For some posts such as those with Spotify links, there is no property with the name link returned. Hence we can't extract the Spotify URL directly. To fetch the URL, we need to call the edge /attachments on the post ID

So to get the attached URLs for such posts, we'll need to make 2 calls. One to <GROUP_ID>/feed that gives us all posts and then check if link exists. If not, we need to make a call to <POST_ID>/attachments to fetch the link attached with the post

mukul-mehta commented 3 years ago

image Here's an example of the information returned on calling /attachments on a post