I can only post to MY (developer) twitter using Twitter4J? - twitter

I feel like I am missing something quite crucial and obvious here.. I have managed to implement Twitter4J into my application. I set up the OAuthConsumerKey, Secret, Token and Token Secret from the details of the app I made in Twitter. Now, when I post images or tweets, they all are posted from the Twitter I use and made the app with. Is that correct? How can I get people to tweet stuff from their own accounts?
Thanks!

Related

Facebook App Notifications

I would like to send notifications on their Facebook global icon when they get a comment in my app. And I found that Facebook offers us an API.
https://developers.facebook.com/docs/games/notifications
And I know that
I should put the code below in my rails app.
POST /{recipient_userid}/notifications?access_token= … &template= … &href= …
I, however, can't understand where to put this code. And I have no idea how to realize this only when my app users get a comment. Could you help me?
You should be using Graph API
To use Graph Api with Ruby you can use Koala
Koala is a Facebook library for Ruby, supporting the Graph API (including the batch requests and photo uploads), the REST API, realtime updates, test users, and OAuth validation.
OR
fb_graph
Both are fairly simple to use, once you have oauth_access_token which you can get by an OAuth strategy for authenticating users against your Facebook App. You may want to have a look at omniauth-facebook.
Informative blogs are out there, should be good to get you started.
http://blog.yangtheman.com/2012/02/09/facebook-connect-with-rails-omniauth-devise/
https://coderwall.com/p/bsfitw

Twitter API: post on behalf of whom?

I want to use Twitter API so my program can post some tweets. To use it I have to register application in dev-center and get some parameters like "Consumer key", "Consumer secret" etc. Then I can use either REST API, or some libraries like twitter4j - OK, that's simple.
But the question is: who will be the "author" of such tweets? Or, in other words, where can I find them after posting? Will they be posted by application or by some user? I can't really figure out how particular user binds to registered API-application... Or how can I specify ("log-in") user to post tweet on behalf of?
The "author" is always going to be the authenticating user. From the Twitter API documentation for statuses/update:
Updates the authenticating user's current status, also known as tweeting.
To answer your other question about authenticating with another user's username/password, it is possible but you need to get permission from Twitter. You also still need to use OAuth. Check out the Twitter API OAuth documentation.
You need to have a twitter account to register your application. So your account will be the author of your posts.

iOS upgrade to twitter api 1.1

I currently have a bunch of apps that go and make simple anonymous calls to the twitter API, and grab several differing timelines. Obviously, twitter is changing things up with 1.1, and is demanding authenticated calls using oauth. Does that mean each of my users need a token (their own account) to do call, or do I need one app token for all of them? Should I be using the twitter api included with iOS 5? Note: These are not the user's timeline...just several news feeds on twitter. Am a bit confused. Any pointers would be appreciated.
This is a good question, I struggled with this myself.
You can use Twitter API client via PHP and then json_encode the user timeline you want and parse it. This is not the best practice, but is a work around I had to do for an app on which I wanted to only display tweets no other action was need, like getting links, retweets, etc.
hope this serves.

Getting facebook wall posts without user login on iOS

Edit: I found the solution here:
Using app access token in IOS
Hi,
I read in this thread:
Facebook API without client authentication for public content
that it is possible to make facebook api graph requests without the need to log in as a user.
I tried getting the app access token with a NSURLConnection request,
but from there I don't know what to do.
How do I get the NSData response into the right format for the token (which is what, a NSString?)?
And how do I send a facebook graph request with the aquired token?
Or is there a simpler way to receive public posts from a facebook wall without the need to login as a user?
Greetings
Michael
Hey i'm struggling a litle bit with the same problem.
Since a couple of days Facebook changed some things concerning having an access tokken. Now, if you only want to read a users posts you will need to have an access token (even if this info is public).
Luckily you can also use the app access token. I'm trying to figure out how to fix this, but here is some information about that: http://developers.facebook.com/docs/authentication/ (chech app login)

OAuth Twitter and Blackberry

I have a j2me project on blackberry that needs to connect to twitter. I did most of the hard stuff already, I've got an api that guided me through to the access token pretty easily. Now I can't seem to get the authentication to work with a status update in REST.
I know my tokens are valid because if I run a GET method like verify credentials, it's fine, everything is valid. But POST messages are just confusing me. Am I supposed to pass in a whole consumer key, signature, oauth version, etc every time I update a status? Or do I just pass the access token? Are they all supposed to be POST variables or just the ones specified in the twitter api as parameters. The twitter api documentation has left me completely lost.
If someone had a link to a site that had examples of all of these messages put into plain text NOT in an library as 99% of tutorials for this situation are, it would be really helpful.

Resources