Upgrading to SDK version 4.1
Version 4.1 of the SDK contains some changes that are not backwards compatible with older versions. You can test your app with the new version ahead of time to address any differences. Here's what you need to know:
What's new
The sendToApp event payload is changing
Most Hootsuite apps with a plugin extension use the sendToApp event payload. In previous versions of the SDK, this JSON payload gave your app the message body, message location, and other fields pertaining to the message that was acted upon. In version 4.1, you will notice different payloads for different social networks. If the sendToApp event relates to a Twitter message then the payload will be limited to the status ID and the account ID of the user who posted the tweet.
Payloads from events that relate to Facebook, YouTube, and Google Plus messages are not affected by this change. They will continue to contain the message text and other rich data.
Changes to the assignments callback payload
It's possible for a Hootsuite app to assign a message to a Hootsuite user. Apps can also register a callback URL and be notified of assignments related to their app. Going forward, the payload contains limited information when a user is assigning a message from a Twitter stream.
The getTwitterAccounts() method returns Twitter account IDs instead of Twitter handles
In older versions of the SDK, the getTwitterAccounts() method provided your app with an array of Twitter account handles (e.g. @hootsuite). In the latest version of our SDK, this method instead provides your app with an array of Twitter account IDs.
Upgrading your app from SDK version 2.0, version 0.6, or version 0.5
Adjust your app code to reference version 4.1 of the SDK instead of version 4.0, 2.0, 0.6, or 0.5:
<script src="https://assets.hootsuite.com/jsapi/4-1/hsp.js"></script>
If you are updating an App with a Stream extension from version 0.5 or 0.6, note that the stream template has been significantly updated, and you will need to make adjustments to your CSS for your app to display properly in the dashboard.
If your app relies on Twitter data that is no longer available through the above methods then you will need to make additional changes to your app. You can use the Twitter API to fetch Twitter data that you need and display it to the user. Twitter’s Status API allows you to retrieve a tweet by ID. You can use Twitter's User API to fetch information about a Twitter account. Find out more from developer.twitter.com.
Need help?
Contact Hootsuite developer support, or take a look at our updated sample app.