08-03-2012 03:51 PM
See the Instructions available in the Installing the Twitter Toolkit VI Package tutorial.
In order to use the Twitter API from an application you need Client/Consumer Credentials and Access Credentials. Each set of Credentials consists of a token and a secret (similar to a username and password). Client Credentials are created at the Twitter Developer site and are are used by your application when talking to the Twitter API. Keep the Client Credentials safe in your application because they are used to represent you to Twitter; if someone figures out your Client Credentials they can pretend to represent your application.
Access Credentials represent the users Credentials in relation to the application. When you use the Twitter Open VI with your Client Credentials, the user will be taken to twitter.com to login and approve your application for their account. If the user approves your application then the Twitter Open VI will return a valid handle to use the Twitter API functions. Twitter Open VI also returns the Access Credentials so that you can save them and use them the next time the user runs your application. By saving the Access Tokens you prevent the user from having to login to Twitter ever time they run your application (see the examples in Step C: Running a Twitter Example in LabVIEW for more details).
See the Instructions available in the Using the Twitter Toolkit in LabVIEW tutorial.
07-03-2013 03:11 AM
I am getting an error 215 out of Verify Credentials.vi.
I have set up the application on Twitter and entered the Consumer Key and Secret.
Do you have to enter the Access Token and Secret anywhere?
Thanks,
Greg
07-03-2013 03:30 PM
Hey Greg!
According to the Twitter Error Codes page it looks like Error Code 215 is a result of Bad Authentication Data: https://dev.twitter.com/docs/error-codes-responses
Some troubleshooting steps:
1. Make sure to remove any spaces before or after the Consumer Key or Consumer Secret when copying from the Twitter Application Settings page; make sure they are entered exactly as they appear on the page.
2. Check that your system clock and make sure the time is accurate.
3. Make sure you have specified a callback url such as http://www.example.com or your own website, etc.
It is not required to enter the Access Credentials. If you leave them blank then it is expected for the Verify Credentials to return an error. When Verify Credentials returns an error you will be sent to a page to login to Twitter and then valid Access Credentials will be returned when you login to your account and approve the application.
07-04-2013 01:44 AM
Thanks for the response.
First of all, I am using the Post New Tweet - Finite.vi.
Once I added a callback url the program now works when I enter a Tweet, Consumer Key and Consumer Secret.
The problem I am getting now is that every time I run the program for the FIRST time, I am taken to Twitter to authenticate my app. Is there any way to not have to do this each time I run the app. I assume this is where the Access Credentials come in?
Thanks,
Greg
07-04-2013 01:47 AM
OK, I think I have it now.
I added an Access Credentials control to the default state of the shift register and now I don't have to authorise my app each time.
Thanks for the help. All seems to be working nicely.
Greg
07-08-2013 12:53 PM
Hey Greg!
Glad you are up and running! Yep, by setting Access Credentials you can prevent the user from having to login each time.
09-02-2014 09:25 AM
Hello,
I get a GPIB error (error 0) when I try to run a simple program. The Twitter Open.vi gives no error, but the subvi after that gives. I'm using LabVIEW 2014.
Thanks,
Arend-Jan
09-02-2014 09:38 AM
Hi Arend-Jan,
The best place to get help is to create a new discussion and mark it as a question. I have gone ahead and made one for us to chat in titled GPIB error (error 0) when I try to run a simple program.
08-20-2016 02:46 AM
Hey MilanR,
I'm getting error 401 occured at New Tweet - Finite.vi...
Body: {"request":"\/1.1\/statuses\/update.json","error":"Read-only application cannot POST."}
I have ensured that I set the Read and Write request before using the VI.
Does this toolkit still valid as it was couple of year back when you people were discussing and I believe that error 401 is common error from twitter for all v1 APIs
08-20-2016 03:30 AM