Twitter follow Code

Hi,
I am trying to implement a twitter follow button for my app.
Following the included Twitter sample code I ended up with this:

 local params = {}  
 params[1] =  
 {  
 key = 'screen\_name',  
 value = "elcelobert"  
 }  
  
 params[2] =  
 {  
 key = 'follow',  
 value = 'true'  
 }  
  
 request\_response = oAuth.makeRequest("https://api.twitter.com/1.1/friendships/create.json",  
 params, consumer\_key, access\_token, consumer\_secret, access\_token\_secret, "POST")  
  
 local response=json.decode(request\_response)  
 local error=nil  
 if response then  
 error=response.error  
 end  
  
 if error or (not response) then  
 delegate.twitterFailed(0)  
 else  
 delegate.twitterSuccess()  
 end  

This uses the oAuth library from the Twitter example.
My problem is: while the call answer is successful, I end up not following any new twitter account.

Any ideas what is wrong in here? I have tested the tweet function and it works fine. Is it possible that the oAuth library only works for certain functions?

Thanks [import]uid: 199470 topic_id: 33789 reply_id: 333789[/import]

Our GGTwitter library allows following, you can either use the whole lib or just the part that you need as it’s open-source - https://github.com/GlitchGames/GGTwitter [import]uid: 119420 topic_id: 33789 reply_id: 134314[/import]

The obvious thing is to make sure you have a twitter callback URL setup. You have to define one on your twitter app setup page (doesn’t have to be functional) and it has to match what you put in your code where oAuth is looking for it.

[import]uid: 199310 topic_id: 33789 reply_id: 134316[/import]

@GlitchGames. Your twitter library looks fantastic! Still have to try but I’ll certainly use it!

@Rob the callback URL is defined properly in both the App’s setup page and the code. Still don’t know what is causing the issue.

Thanks so much!
I’ll let you know if it works! [import]uid: 199470 topic_id: 33789 reply_id: 134370[/import]

Hope it helps! [import]uid: 119420 topic_id: 33789 reply_id: 134391[/import]

Our GGTwitter library allows following, you can either use the whole lib or just the part that you need as it’s open-source - https://github.com/GlitchGames/GGTwitter [import]uid: 119420 topic_id: 33789 reply_id: 134314[/import]

The obvious thing is to make sure you have a twitter callback URL setup. You have to define one on your twitter app setup page (doesn’t have to be functional) and it has to match what you put in your code where oAuth is looking for it.

[import]uid: 199310 topic_id: 33789 reply_id: 134316[/import]

@GlitchGames. Your twitter library looks fantastic! Still have to try but I’ll certainly use it!

@Rob the callback URL is defined properly in both the App’s setup page and the code. Still don’t know what is causing the issue.

Thanks so much!
I’ll let you know if it works! [import]uid: 199470 topic_id: 33789 reply_id: 134370[/import]

Hope it helps! [import]uid: 119420 topic_id: 33789 reply_id: 134391[/import]