can i tweet from webservice to twitter using oAuth?
Could anyone please tell me what I should do?
The following PHP Twitter libraries support OAuth:
twitteroauth
twitter-async
Twitter API CodeIgniter Library
They are fairly similar: about the only difference is that twitter-async uses asynchronous Curl calls to Twitter which may be faster depending on what you are doing with the Twitter API.
If you have a one to one mapping between a twitter account, and your web service, you still need to authorize an access token at least once.
Once you have an authorized access token, you can make twitter requests as needed.
Just a guess that this is what you want though...
Related
Is it possible to passively access google API using google api php client library? What I want to do is connect to google API by providing necessary credentials (not using oauth).
Basically, my oauth authentication will be in googleads php lib and want to access resources using php client lib. Or is there any way to accomplish this? Thanks.
EDIT:
What I really curious about for hours is integrating those two libraries (GoogleAds PHP Api and Google API Client API). The former uses pure Oauth and the latter uses 'Google_Client' implementation in accessing Google API.
Is there a way to Login and Post or Update status in Facebook with just PHP cURL? Just plain old form submission without api or sdk?
Yes you can, but you'd essentially be rebuilding the core of the Facebook PHP SDK.
The minimum you'd need is to build is an OAuth 2.0 login flow, which - if you want to implement your own - is documented here. This is needed to obtain an access token that you can then use to make Graph API calls (every Graph API call requires an access token).
Making graph API calls is fairly easy to do with cURL, so you could do the same in PHP. To see example cURL commands, you can see the each Graph API endpoint's reference documentation here
I've created a twitter app (using PHP as the programming language) that requires the authorization from the users. This app has 'read and write' access. How do I tweet on my users behalf through this app. I've also searched a lot on the internet but to no avail. I'm a beginner and this is the first app that I've created. So I don't have much idea here.
First you use the OAuth 1.0A flow to obtain an access token representing the Twitter User's authorization of your application to work on their behalf.
Once you have this access token, you use it in OAuth 1.0A signed requests to Twitter's statuses/update API method, which is the API method that creates tweets. https://dev.twitter.com/docs/api/1.1/post/statuses/update
It's best to use a library to perform these actions, such as tmhOAuth for PHP: https://github.com/themattharris/tmhOAuth
There are examples for negotiating tokens and tweeting using tmhOAuth here: https://github.com/themattharris/tmhOAuthExamples
If you're new to OAuth, this guide is pretty helpful: http://oauthbible.com/
As the title of the question suggests; whats the difference between Facebook Php API and oAuth Authentication?
It seems there are two methods for authentication wtih Facebook. One is the oAuth 2.0 which can be seen here. The other one is the Facebook PHP API (which also uses oAuth since V3)
Is there a difference between these two?
Yes, a big difference. oAuth is just one thing the PHP API can do. The PHP API can get stats, friends list, post to walls, send request, etc. Of course, most things can't be done with the PHP API until you authentication, using oAuth.
One way to think of it is that oAuth is the login, PHP API is how you interact with Facebook.
I can't find any mention on how to do this with twitter api. I'd like to do it without buying this commercial software:
http://www.webdesigndev.com/photoshop/how-to-brand-your-tweets-with-your-url-and-why-you-should
I mean not just having my appname but putting any name I want at any time.
I think it's chosen when you create the application for the twitter API: http://dev.twitter.com/apps/new
Currently this can only be done if your application implements OAuth authentication to Twitter. In the past, non-OAuth apps were able to send a source parameter, but that has been discontinued for any new apps.
From Twitter's API FAQ
If you would like tweets from your
application to receive a source
parameter, please register an
application and implement OAuth
authentication. We will automatically
include your application as the source
for any tweets sent from your
application.
Also, check out this similar SO question.