Forum Xamarin Xamarin.Forms

How to retrieve Facebook feed or posts easily

Pierre-ChristopheDusPierre-ChristopheDus FRUniversity ✭✭✭

I'm working on a basic **Xamarin.Forms **app for a client, which will contain some tabs like :

  • a company presentation tab (address, phone number, mail, ...)
  • a news tab, with data coming from a dedicated API, or posts from the company's Facebook page
  • a tab allowing to schedule an appointment
  • an about page tab

For the news tab, I would like to display a date, an image and a description. If the news come from Facebook, I would like to display too the URL to redirect the corresponding post.

To recover the Facebook feed of my client's page, I've created a new app on developers.facebook.com, and I can recover some informations ("created_time", "message", "id") through the API Graph Helper, with calls like "client_page/feed" or "client_page/posts".

For the moment, I'm able to recover the data in my app with the corresponding URL:
https://graph.facebook.com/v8.0/client_page/posts?fields=message,message_tags,picture,full_picture,permalink_url,created_time,story&access_token=ACCESS_TOKEN

But I have to regenerate the access token regularly: how to prevent for this? Is there another way to recover Facebook feed of a page in a Xamarin app?

Answers

Sign In or Register to comment.