From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Twitter Toolkit for LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OAuth not working anymore

Hi! I got a problem when trying to twitter with oauth, i always get an error 85, saying:

Error 85 occurred at Scan From String (arg 1) in OAuth.lvlib:Read Tokens.vi->OAuth.lvlib:Exchange for Access Token.vi->OAuth.lvlib:Get Pin Access.vi->NXTweet mit User Login.vi

Possible reason(s):

LabVIEW:  Scan failed. The input string does not contain data in the expected format.

The exact problem is described here, but i am not an expert, so i do not know how to repair the VI so it is working with this new twitter settings:

https://dev.twitter.com/discussions/16443

/seb

0 Kudos
Message 1 of 37
(21,016 Views)

Hi Trella,

I tried the current release of the Twitter Toolkit (v0.1.1.6 from i3_twitter-2012-10-29.vipc) available on the homepage: https://decibel.ni.com/content/groups/interactive-internet-interface-twitter-toolkit-for-labview

And I was able to tweet using the following VI: <LabVIEW>\examples\Interactive Internet Interface\i3 Twitter\Examples\Post New Tweet - Finite.vi

As well as read tweets using the following VI: <LabVIEW>\examples\Interactive Internet Interface\i3 Twitter\Examples\Get New Tweets - Finite.vi

Were you able to run those example programs correctly?

Best,

Milan


Milan
0 Kudos
Message 2 of 37
(12,095 Views)

Hi Milan,

i tried some other VI. I will check the version you named when back at work next week on wednesday. Thanks for your comment so far. I will give feedback.

Best,

Sebastian Trella

0 Kudos
Message 3 of 37
(12,095 Views)

Hi Milan,

it tried the VI you mentioned. It is not working for me. I get the same error like before, because this VI is also not using the "oauth_verifier". How did you get it to work, can you try again?

Br,

Sebastian Trella

0 Kudos
Message 4 of 37
(12,095 Views)

Hi Trella!

It actually looks like Twitter did a full switch to the Twitter API v1.1 last Tuesday according to their blog so all Twitter v1 APIs (like this one) are broken: https://dev.twitter.com/blog/api-v1-is-retired

So right now the i3 Twitter API is non-functional. I have been working on a release that uses Twitter API v1.1 and will try and push a release early this week! I will let you know when it is updated!

Best,

Milan


Milan
0 Kudos
Message 5 of 37
(12,095 Views)

For those looking to get this Twitter API back running before the new release, I believe you just need to change a few URLs (since it was already using JSON/OAuth):

In Get Tweets New, change https://api.twitter.com/1/statuses/user_timeline.json to https://api.twitter.com/1.1/statuses/user_timeline.json

In Post Tweet, change https://api.twitter.com/1/statuses/update.json to https://api.twitter.com/1.1/statuses/update.json

In Verify Credentials, change https://api.twitter.com/1/account/verify_credentials.json to https://api.twitter.com/1.1/account/verify_credentials.json

I'm only logging in/getting access strings, posting text, and retrieving text posts.  So if you are doing re-tweets, media, etc., there may be other URLs to change.

0 Kudos
Message 6 of 37
(12,095 Views)

Hi! You are using the VIs from http://i3-labview.googlecode.com/files/i3_twitter-2012-10-29.vipc ? And changing the address did work?

0 Kudos
Message 7 of 37
(12,095 Views)

Yes, that is the version I am using.  And changing the addresses worked, but I only tested logging in, posting regular text tweets, and checking new text tweets.

The other functions probably need similar changes.  You can do a search for api.twitter.com, and every instance that has api.twitter.com/1/xxx, change '1' to '1.1'

0 Kudos
Message 8 of 37
(12,095 Views)

I am trying to use the "Post New Tweet - Finite.vi". I changed every link in every SubVI using the 1.0 API to 1.1 API, but it is not working...same error as before. Could you please send or post your changed/working version of you VI to <deleted by MilanR>? That would be very nice!

Br,

Sebastian

Message was edited by: MilanR

Please do not provide your email address in the forum. If you would like to get in touch with someone directly you should send them a private message.

0 Kudos
Message 9 of 37
(12,095 Views)

Hi Trella,

An updated version of the Interactive Internet Interface: Twitter Toolkit for LabVIEW has been released that uses Twitter API v1.1 and uses a new browser based login mechanism that does not require the user to manually enter a pin number.

The features are available in Twitter release 2013-06-17 and can be downloaded on the homepage.

Best,

Milan


Milan
0 Kudos
Message 10 of 37
(12,095 Views)