Twitter Plugin is Available Now!

@appdevguy: I’m unable to reproduce the issue you reported - tweeting using twitter.tweet, both with and without an image attached, is resulting in a proper response table getting passed to my listener function, including the tweet’s ID. This is using my sample Twitter demo. If you can zip up a small test case that makes it possible to reproduce the specific issue you mentioned, I’m happy to take a look, but at the moment I’m unable to fix it because I’m unable to reproduce it.

As for adding the full response, I’ll look into it, but in general my goal was to strip that away from the convenience functions, to make them as simple as possible for novice users. If you need the full JSON response, you can always use twitter.request() - that’s all that twitter.tweet() is anyway: just a wrapper around a twitter.request() call. :slight_smile:

Anyone who used this plugin knows if it is necessary for the user to login before the app can make a twitter.request() call?

Hi @Falcon777:

 

Yes, unfortunately Twitter’s REST API won’t let you make unauthenticated requests, at least last time I checked.

 

You can get around this by manually populating the twitter.user table, which contains the token data necessary to make requests after a user logs in. But if a lot of people use your app, using the same token for all those users will cause errors because Twitter limits the number of requests a single token can make in a short period of time.

 

If you want to retrieve the necessary token data, just log in yourself and then iterate over the twitter.user table like so:

 

for k,v in pairs(twitter.user) do print(tostring(k) .. “: “ .. tostring(v) end end

Then add code to your app that manually populates that table with those values at launch. But proceed with caution, and I’d personally advise against this. If you run into Twitter’s rate limit too frequently, they could take action against your app for spamming, which could cause a whole slew of headaches.

 

Best,

Jason