Instagram Interchange Reference

The Instagram interchange tools collect the data from Instagram accounts for use with the dcServer Instagram feeds or pins. In order for the Instagram interchange to work you'll need a Facebook App that can read from specific, approved,Instagram accounts.

Facebook App

If not already configured, add a Facebook App by logging into the Facebook Developer website. TODO how to create App and add Instagram Basic Display.

If already an admin of an appropriate FB App, login to Facebook Developer website and go to My Apps. At designCraft we have an App - designCraft Code Feeds, App ID: 796239300430860 - for managing our clients. Each agency that uses dcServer needs their own app.

Instagram Accounts

TODO how to add a new client Instagram account to the App

  • Tester Invitations
  • User Id
  • Generate Token

Notes about Instagram Tokens

Tokens only last a few months. They need to be regularly replaced. Usually this is an automated process, but if something goes wrong with the automation then the current valid token may expire and your site may end up with an invalid token and no access to the feed. No new posts can be read from the feed after the token has gone invalid. To solve this problem, see the support section below.

When a client account is registered and a new token is generated it is easiest to add that token to the configuration, see below. However, keep in mind that the token is only valid for a period of time. If this token is used for development and then many months later the default token in Settings is used on a new Production server that token could already be expired. The development server may still work because it has been refreshing its tokens automatically and is no longer using that basic token from settings.

Website Configuration

Add the settings into the config.xml for the site. These go right in with the social media settings, like so:

<Catalog Id="Social-Instagram-Both"> <Settings Url="https://www.instagram.com/monroestreetframing/" BasicToken="NNNNN" UserId="17841402031400643" /> </Catalog>

You'll need the UserId for the client's Instagram account. You'll also need a token (BasicToken) for accessing the account, see account management above.

Web Page Integration

TODO Place a dcm.InstagramWidget on your page to read the feed provided by the interchange. TODO link to tag reference

Feed Status

Each server, even the individual development servers, keeps its own access token up to date. If the Instagram feed does not seem to be working or up to date, check the status page. Sign into the CMS as a System Admin (or Root) user on the server (dev or prod) that exhibits the issue. Open the CMS main menu and select System. From here select the Interchange tab. Review the Instagram section of the page. If any of the following are missing or expired in the list then you'll need to reset the cache: User Id, Token, or Token Expiration. Also if Token Disabled is set to “yes”.

Cache Last Checked tells you when the cache was last loaded and it typically won't load again for another hour. If a new Instagram post is not showing and it has been less than an hour then the cache is the issue. Normally an hour delay is not too long, but you could choose Reset Cache to force it to check again.

Support

Once the initial token has expired, each and every server (development, production, test, etc) using that client's feed will have its own token. Any or all of those could fail. Independently review and fix each server with that client's feed.

Step One - Get a new Token

You'll need your client's Instagram login for this step. Please review and confirm the login before continuing.

Don't worry, getting a new token for your client won't break any of the feeds that are still working. So if you have a development or other server that cannot access the feed, start by getting a new token for that server. The same new token can be used to fix multiple servers if many are showing the same issue.

Enter the FB App for you agency's feeds. Select Instagram Basic Display under products. Select Basic Display from that list. Scroll to the User Token Generator. Your client should already be listed here. If not please follow the procedure above on how to add Instagram Accounts.

Next to the client is a Generate Token button. Click that button and use the client login to approve the token. Once the token is generated, save it someplace safe.

Step Two - Login to Server

For each server that is not working, sign into the CMS as a System Admin (or Root) user. Open the CMS main menu and select System. From here select the Interchange tab. In the section for Instagram, enter the new token, from step one, and click Refresh Token. You should get an affirmative message and then try to refresh the page with the Instagram feed on it. Give it a little while to restore the Instagram cache. Once the page finishes loading the feed on the website should be up to date with the client's Instagram account.