Instagram App Integration
The Instagram app for Screenly allows users to display their Instagram feeds on Screenly players. This app integrates with the Screenly API to fetch and display content.
Authentication
The Instagram app uses OAuth 2.0 for authentication. Users must grant the app access to their Instagram account to display their feeds.
Configuration
The Instagram app configuration includes the following settings:
- App ID: The Instagram app ID.
- App Secret: The Instagram app secret.
- User ID: The Instagram user ID whose feed to display. This field accepts a single User ID or a comma-separated list of multiple User IDs.
- Access Token: The Instagram access token. Users need to obtain the access token by visiting the Instagram website and authorizing the app to access their account.
Example Configuration
{
"appId": "YOUR_APP_ID",
"appSecret": "YOUR_APP_SECRET",
"userId": "YOUR_USER_ID",
"accessToken": "YOUR_ACCESS_TOKEN"
}
Fetching Content
The Instagram app uses the Instagram API to fetch content from the configured user’s feed. It requests the following information from the Instagram API:
- Media Type: The type of media to display (e.g., photos, videos).
- Media Count: The number of media items to display.
Content Display
The Instagram app displays the fetched content on the Screenly player using the following parameters:
- Layout: The layout of the displayed content.
- Image Size: The size of the displayed images.
- Autoplay Videos: Whether to automatically play videos.
Example API call:
https://api.instagram.com/v1/users/{user_id}/media/recent?access_token={access_token}&count=10
Code Files:
https://github.com/screenly/playground/blob/master/src/app/services/instagram.service.ts
Additional Information:
- To learn more about the Instagram API, refer to the official documentation: https://developers.facebook.com/docs/instagram/
- For information on OAuth 2.0, refer to the official documentation: https://www.oauth.com/
- For information on setting up an Instagram app, refer to the official documentation: https://developers.facebook.com/apps/