CC3000 twitter example

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
thepeabody
 
Posts: 4
Joined: Wed Oct 03, 2012 5:53 pm

CC3000 twitter example

Post by thepeabody »

Has anyone tried out the twitter example in the Adafruit CC3000 breakout board code repository?
I recently joined twitter. Then I generated the 4 keys required for operation of the example code.
I have still not seen any message show up in my twitter account.
Are there any other items that need to be set other than the ones requested in the example code?
Any help is appreciated. A twitter newbie...

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: CC3000 twitter example

Post by Franklin97355 »

Are you sure the program is sending the data from your system?

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: CC3000 twitter example

Post by pburgess »

What do you see in the serial monitor when running the sketch? This should give a little insight if the problem is with the WiFi, Twitter API keys, etc.

User avatar
thepeabody
 
Posts: 4
Joined: Wed Oct 03, 2012 5:53 pm

Re: CC3000 twitter example

Post by thepeabody »

Here is what I see on the serial monitor:

Hello! Initializing CC3000...Firmware V. : 1.19
OK
Deleting old connection profiles...OK
Connecting to network...Started AP/SSID scan




Connecting to 2ad825...Waiting to connect...OK
Requesting address from DHCP server...OK
IP Addr: 192.168.0.107
Netmask: 255.255.255.0
Gateway: 192.168.0.1
DHCPsrv: 192.168.0.1
DNSserv: 192.168.0.1
Locating time server...found
Connecting to time server...
Connect to 18.85.44.118:123
connected!
Issuing request...OK
Awaiting response...success!
Locating Twitter server...OK
Connecting to server...

Connect to 199.59.148.20:80
OK
Issuing HTTP request...OK
Awaiting response...success!
Waiting ~1 hour...

On my twitter account. I see nothing.

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: CC3000 twitter example

Post by Franklin97355 »

Code: Select all

Connect to 199.59.148.20:80
OK
Issuing HTTP request...OK
Awaiting response...success!
This looks like you are getting connected, perhaps Twitter is blocking the request?

User avatar
thepeabody
 
Posts: 4
Joined: Wed Oct 03, 2012 5:53 pm

Re: CC3000 twitter example

Post by thepeabody »

How can I tell if they are blocking my request, other that the fact that I am not receiving a twitter?

User avatar
cliff52
 
Posts: 33
Joined: Fri May 25, 2007 9:41 pm

Re: CC3000 twitter example

Post by cliff52 »

I am having much the same experience that you report - messages from the app seem to indicate success but my Twitter shows nothing.

All the other examples worked fine.

The instructions for the Arduino application mention making sure the app is set to Read and Write but I didn't catch it the first time so I tried using the default 'Read Only'. The settings page for dev.twitter (https://dev.twitter.com/apps/~/settings) shows the option. I changed it to Read and Write but when I check on my twitter page, it still shows set to Read Only.

I haven't confirmed this is the problem, yet.

The ~ in the url is a number which I believe was unique to me.

User avatar
cliff52
 
Posts: 33
Joined: Fri May 25, 2007 9:41 pm

Re: CC3000 twitter example

Post by cliff52 »

OK, that was the problem. I never could get the first application to update to Read and Write as noted on my Twitter page Apps list, so I just started over with a new application.

When you create the consumer tokens on dev.twitter.com, the default application setting is Read Only.
Before clicking the 'Create Access Token' button, slide over to settings and change Read Only to Read and Write, then go back to the first window and create the access tokens.

Doing it this way, I put the new keys in the Arduino application and it compiled and ran successfully and the Tweet showed up on my Twitter page. On my Twitter settings page, the new App shows 'Read and Write' permissions. The old one still shows 'Read Only'.

Again, this is mentioned in the Arduino application notes, I just missed it the first time.

(PS. I verified that if you generate the Access Tokens with permissions set at Read Only, you have to change the settings to Read and Write, then re-generate the Access Tokens before it's really changed. The Consumer Tokens are unaffected - you just have to plug the new Access Tokens into the Arduino code, re-compile, and re-load.)

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: CC3000 twitter example

Post by Franklin97355 »

@cliff52 Good work, this might help others and that is what these forums are all about, thanks.

User avatar
thepeabody
 
Posts: 4
Joined: Wed Oct 03, 2012 5:53 pm

Re: CC3000 twitter example

Post by thepeabody »

cliff52's solution corrected my problem. Hooray!

Thank you cliff52 :D

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”