Twitter API

Michael Mikkelsen 8 years ago updated by John Heryer 8 years ago 5
I have found that some of the Twitter API calls are not working. I'll try to list them in this thread along with the error messages and any workarounds.

1. saved_searches/create

<datasource name="twitter-savesearch" source="" query="/" providertype="twitter"/>

<panel name="searchPanel" width="70%" height="10%" background="#FFFFFF" align="center" cornerradius="15" clip="yes" borderwidth="1" bordercolor="FFFFFF" >
<text name="saveButton" width="20%" height="100%" align="right" alignment="center" font="helvetica" background="2222AA" color="ffffff" size="14" text="Save" clip="yes" onclickup="SaveTwitterSearch" ></text>
<textfield name="SearchText" alias="FIELD" height="90%" width="75%" rightof="Searchicon" padding-left="3" valign="center" placeholder="Search" autocorrect="no" color="#000000" alignment="left" valignment="center"/>


<action name="SaveTwitterSearch">
<assign property="datasource:twitter-savesearch.source" value="https://api.twitter.com/1/saved_searches/create.json?query=[object:FIELD.encodedtext]" />

<action name="ActionTwitterSaveSearch" datasource="twitter-savesearch" datasourceevent="querycomplete">
<if lhs="[datasource:twitter-savesearch.1.errors]" operator="ne" rhs="">
<alert message="SS [datasource:twitter-savesearch.dataSourceResultCount] Twitter Error. 1: [datasource:twitter-savesearch.1.errors]"/>
<if lhs="[datasource:twitter-savesearch.1.error]" operator="ne" rhs="">
<alert message="SS [datasource:twitter-savesearch.dataSourceResultCount] Twitter Error. [datasource:twitter-savesearch.1.error]"/>

Twitter Error: message: Could not authenticate you, code: 32

Twitter Error: Could not authenticate with OAuth.

No Workaround Found.
2. statuses/user_timeline (screen_name=[object:FIELDUSER.encodedtext])
(note: this api call does work for getting the authenticated users timeline but not other users timelines)

Twitter Error: message: Could not authenticate you, code: 32

Twitter Error: message: Sorry, that page does not exist, code: 34


Limitations of workaround: protected users timeline will not be visible even if the authenticating user's follow request was accepted by the protected user. (no user authentication means only public feeds are available)

Let me spend some time with these. I know we have a team in place to address these twitter 1.1 issues.
There are two issues.

The first is a bug in the engine that does not properly use a post request to twitter with this api call. That has been fixed. If you can build an adhoc release with live updates you will have access to the fix immediately. If not, it will be released with the next version of fusebox in a couple of weeks.

First you must use the twitter 1.1 api:


So replace
Will I be able to assign the "datasource:twiterservice.postContent" property on a twitter datasource?
You shouldn't need to. Just append the post parameter to the url as shown above. It's a little inconsistant with our other datasource providers. The goal was to maintain backwards compatibility with apps that use the 1.0 frame work and do not take advantage of ios' native twitter support.