Twitter Toolkit for LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OAuth not working anymore

Hi Sebastian,

Using the provided tokens I was able to reproduce the error and it appears to be related to the following behavior from Twitter: https://dev.twitter.com/discussions/392

To prevent the problem please update the application to use a dummy url in the callback field. For example in my test application I use www.example.com as seen below:

Capture.PNG


Milan
0 Kudos
Message 21 of 37
(4,168 Views)

Thank you! I will try this and give feedback.

0 Kudos
Message 22 of 37
(4,168 Views)

That's it! It is working! Thank you very much for your help!

0 Kudos
Message 23 of 37
(4,168 Views)

I still have two erros. Tweeting is working when i don't handle this errors and just continue, but i would like to get these erros out.

Twitter Open.vi still produces:

twitter open.png

and Post Tweet.vi also produces.
post tweet.png

Both errors occur in HTTP Error.vi...what is wrong here?

Best,

Sebastian

0 Kudos
Message 24 of 37
(4,168 Views)

Hi Sebastian,

I have tried your example using the credentials you gave in the private message and I do not receive an error. Are you using the newest VIs from the package or a modified version of the older VIs?

If you are not using the newest version of the toolkit as provided without modification then please reinstall and use the newest version of the toolkit.

If you are using the newest version of the toolkit then perform the following:

Can you open the HTTP Error.vi and go to Operate » Suspend When Called and then run the twitter test.vi again. Please provide the Header and Body as they appear.

Edit: I tried using both the Access Token and the Client credentials and I was able to post a tweet to the https://twitter.com/nxtweetbot (it was the message "keep trucking", sorry about that, you may want to delete it). I used the new twitter test.vi that was provided and did not receive any errors. Please let me know the value of the header and body fields when using the newest version of the toolkit to troubleshoot.

Message was edited by: MilanR


Milan
0 Kudos
Message 25 of 37
(4,167 Views)

Hi Sebastian,

Were you able to perform the described test? I have also made a new version of the HTTP Error.vi that may give more details. To use the VI you will need the version of the Twitter Toolkit from the homepage and then paste the attached VI in the following directory to overwrite the existing HTTP Error.vi: <LabVIEW>\vi.lib\LVH\i3 Twitter\SubVIs\


Milan
0 Kudos
Message 26 of 37
(4,168 Views)

Hi, I'm new to this community, thank you for your work.

I have the same problems of Trella and I'm using LabView 2012 Student Edition.

I overwrote HTTP Error.vi in the correct folder but I get the same error:

Error 85 occurred at Scan From String (arg 2) in i3-twitter.lvlib:HTTP Error.vi->i3-twitter.lvlib:Twitter Open.vi->Post New Tweet - Finite.vi

Unable to Parse HTTP Response with Header:

HTTP/1.1 200 OK

cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0

content-length: 166

content-type: text/html; charset=utf-8

date: Sun, 07 Jul 2013 20:13:35 GMT

etag: "ed652e15bab207d8e752f199d8606263"

expires: Tue, 31 Mar 1981 05:00:00 GMT

last-modified: Sun, 07 Jul 2013 20:13:35 GMT

pragma: no-cache

server: tfe

set-cookie: _twitter_sess=BAh7BzoHaWQiJWJhMGQxY2NmNmI1YWE1NDNlMTdmZjllNTkwNjc2ZmFhOg9j%250AcmVhdGVkX2F0bCsINp%252FEuj8B--b5ce700179a8015ee018867c7e8ad469d60fe5...

(source truncated)

0 Kudos
Message 27 of 37
(4,168 Views)

Hi rollingringhio,

If you have the front panel of the HTTP Error.vi open when you run the Post New Tweet - Finite.vi sample program you should see the header and body fields. Can you right click in each of those fields and choose '\' Codes Display, run the VI again, and post what the contents of Header and Body are?

capture.png


Milan
0 Kudos
Message 28 of 37
(4,168 Views)

Thank you for your answer,

Header is:

HTTP/1.1\s200\sOK\r\ncache-control:\sno-cache,\sno-store,\smust-revalidate,\spre-check=0,\spost-check=0\r\ncontent-length:\s166\r\ncontent-type:\stext/html;\scharset=utf-8\r\ndate:\sMon,\s08\sJul\s2013\s21:32:24\sGMT\r\netag:\s"ed652e15bab207d8e752f199d8606263"\r\nexpires:\sTue,\s31\sMar\s1981\s05:00:00\sGMT\r\nlast-modified:\sMon,\s08\sJul\s2013\s21:32:24\sGMT\r\npragma:\sno-cache\r\nserver:\stfe\r\nset-cookie:\s_twitter_sess=BAh7BzoHaWQiJTk2ZTA5ZGVlZGE3MTNkYWViZjUwZGU5MzdlNzM0NWZhOg9j%250AcmVhdGVkX2F0bCsI8CQzwD8B--37de906938ef7313b56121d2947cd106d966b015;\sdomain=.twitter.com;\spath=/;\sHttpOnly\r\nset-cookie:\sguest_id=v1%3A137331914456705346;\sDomain=.twitter.com;\sPath=/;\sExpires=Wed,\s08-Jul-2015\s21:32:24\sUTC\r\nstatus:\s200\sOK\r\nstrict-transport-security:\smax-age=631138519\r\nvary:\sAccept-Encoding\r\nx-frame-options:\sSAMEORIGIN\r\nx-mid:\sa344398a85f656f8d4784d7daa34b8df3e90f523\r\nx-runtime:\s0.03971\r\nx-transaction:\s327a73ffeb70867c\r\nx-ua-compatible:\sIE=10,chrome=1\r\nx-xss-protection:\s1;\smode=block\r\n\r\n

Body is:

oauth_token=1516947793-xvWBkaiVNTCGVtW1ZEEeBpub8Ki5gvGnha3phbP&oauth_token_secret=IDqIZgZHukrXtCLfm1BuxnLlbrIf6jYNsKlwsspM&user_id=1516947793&screen_name=massimo

0 Kudos
Message 29 of 37
(4,168 Views)

Hi rollingringhio,

I am a bit baffled by why you are getting this error. If I open the HTTP Error VI, copy and paste the text that you gave me into the HTTP Error.VI, and press the run button I do not get an error:

capture.png

I tried this in LabVIEW 2012 SP1 Student Edition on Windows 7 using the newest version of the package available here: https://decibel.ni.com/content/groups/interactive-internet-interface-twitter-toolkit-for-labview

Are you able to narrow down more closely when the error occurs? Maybe there is a VI before hand that causes an error?


Milan
0 Kudos
Message 30 of 37
(4,168 Views)