function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
paul-lmipaul-lmi 

issue with Twitter v2

The request to twitter failed. Failed to parse XML due to: only whitespace content allowed before start tag and not F (position: START_DOCUMENT seen F... @1:1)| An error occurred for this search: [id : a0O300000027JzrEAE, page : 0]
The request to twitter failed.
System.HttpRequest[Endpoint=https://twitter.com/statuses/user_timeline.xml?since_id=19360744679&count=99&page=0, Method=GET]
System.HttpResponse[Status=Unauthorized, StatusCode=401]
Twitter returned the following message while performing this action: Twitter error code: 401, Twitter Error Message: Invalid / used nonce. Please review Twitter error messages at http://apiwiki.twitter.com/HTTP-Response-Codes-and-Errors  and check Twitter’s system status at http://dev.twitter.com/status

 

Also, when I try to delete and readd the Twitter account, I get this when trying to regrant OAuth

 

The request to twitter failed. Failed to parse XML due to: only whitespace content allowed before start tag and not F (position: START_DOCUMENT seen F... @1:1)

 

 

This started over the weekend, without anything being touched.  We had some scheduled jobs set to run every 10 minutes to grab tweets related to a single Twitter account, and it was working fine for about 4 days.  Now, we're completely stuck, and having to revert back to using CoTweet.

 

LNIngramLNIngram

Hi Paul,

 

We're seeing this error in several orgs, have identified a fix, and are currently in testing.  For now, we recommend you switch to using username/password authentication; simply click the "Revoke Twitter Access" button on the Twitter Account, then enter your password in the password field. 

 

Please email me at lingram@salesforce.com if you need more information, or have any difficulty getting tweets into your org once you've moved to username/password.

 

Sincerely,

 

- Lauren

paul-lmipaul-lmi

thanks much.  the latest update definitely resolves the OAuth issue.

Christopher PennChristopher Penn

We are having this issue as well, and revoking access and then using a password has no effect.

LNIngramLNIngram

Hi Christopher,

 

First, please update to the latest version - you can do this by going back to the AppExchange page and following the same steps as for your first install.  Then revoke access, and reauthorize your user.  If this doesn't fix it, please contact me directly at lingram at salesforce.com.

 

All the best,

- Lauren

apexsutherlandapexsutherland

What was the fix for this issue in the Apex code? I'm getting a similar error when working with a different XML-based web service, and I'd like to know what was done to get around the issue.