I once had a decent implementation of my Twitter feed on my website but apparently Twitter's authentication has changed and all my functionality is broken. All I need to do is retrieve my timeline, including tweets and retweets - nothing fancy, not an app, nothing.
I'm having a terribly hard time finding any resources to help me do this. I need things spelled out for me clearly and concisely, which none of the tutorials I've found (especially on Twitter) seem to do. Can anybody help me? Please?
Thanks,
Mike
Twitter now uses oAuth for their API authentication. You can find a large number of PHP oAuth frameworks/libraries out there that should be able to facilitate your needs. I have used twitteroauth by Abraham Williams. You can find it easily enough on GitHub.
Related
Can somebody help me in understanding how to retrieve the home timeline of the user. Examples of how this could be used would be perfect, but if that is too much to ask for, then links to tutorials which start at the beginner would also be great which can go through step by step.
Also what other external files would I need to be able to accomplish this?
check this...There are several links also. this might be useful. http://viralsolani.wordpress.com/2012/05/26/writing-your-first-twitter-application-with-oauth/
I am trying to create a system that can create jira tickets from our application, which is independent of jira.
I have heard of REST API and Soap API but I dont really know how to use these api?
Is there anything that can help me to get a kick start?
any help is highly appreciated.
Have a look at the documentation. http://docs.atlassian.com/jira/REST/latest/
A REST api usually accepts HTTP request with data and sends something back. And there are plenty of REST clients written in PHP, so you won't need to do it again. Just have a look at packagist.org and search for "rest" to find about 14 pages worth of related stuff, with "Guzzle" being the most used: https://packagist.org/packages/guzzle/guzzle
Read up :)
https://en.wikipedia.org/wiki/Representational_state_transfer
https://stackoverflow.com/questions/2217758/what-is-a-rest-api
Simple question really, I've been looking all over the Internet probably for the past few days for several hours a day looking for some solid information on OpenID and Facebook Connect integration on a website.
I have seen the same names popup such as Janrain offering their solution, but I see a lot of websites such as Invision Power Board forums and even here at StackOverflow utilising different solutions.
The main two logins we wish to accept on our site are Facebook and Twitter. I've really been looking for a tutorial, or at least a guide to incorporating this functionality into a PHP website.
If anyone has any information or any pointers that would be great.
Thanks!
I'd start with the official docs. They're pretty good.
http://developers.facebook.com/docs/authentication/
http://dev.twitter.com/pages/sign_in_with_twitter
The twitter one is a little more obtuse, but it's still pretty easy to follow.
For Twitter, just use their simple JavaScript SDK:
http://dev.twitter.com/anywhere/begin
But I would really avoid implementing these services myself. E.g. Twitter anywhere is maybe painless to setup, but then you rely on their JavaScript. It's been down before and then your page takes ages to load or doesn't load at all.
I haven't tried the new Facebook APIs, but 2 years ago, I wasted a way a week of my life trying to integrate their API and the general idea I got was -- unless you know someone at Facebook that can check out some log or let you know why this API doesn't respond like it's supposed to, you're just on your own.
We do use Janrain's engage product (free). It works really, really well.
Dealing with all these services directly is a royal (!) PITA. They are down, change how they work, mis-behave -- it's good to outsource that to someone who seems to know all the ins and outs. In our case Janrain.
There's a copy and paste Facebook login button solution out there. It's also free. It's developed by LaunchBit. You could try that.
http://toolkit.launchbit.com
I'm nearly finished building a simple web application that would really benefit from integration with Twitter through its API. I think the best way to do this would be through following and direct messages similar to how RTM has chosen to interact with users through Twitter. I learn best by analyzing examples, so I would like to find some good examples that illustrate how to use the Twitter API for interaction with users. Thank you.
My web application uses PHP and MySQL.
This is a pretty good article / set of examples for using the PEAR Services_Twitter library to do a bunch of different twitter actions including direct messages and following.
Using the Twitter API with PHP and PEAR: http://devzone.zend.com/article/4431
It is a year old though, so it doesn't use OAUTH. To find an example of that, check out the documentation:
http://pear.php.net/package/Services_Twitter/docs/latest/Services_Twitter/Services_Twitter.html
The Twitter API supports cUrl, so you can use that library to send the necessary headers and retrieve the data you require. A good example here:
http://applicationdeveloper.net/2009/07/12/post-twitter-curl/
I am creating a little flash game for the facebook platform, but I am finding it very difficult to get any decent documentation on the graph api and the PHP SDK, so if anyone has a decent resource for a beginner to go and learn the basics, I would appreciate it very much, as I am struggling to grasp the concept.
Thanx!
I agree that the docs can be pretty hard work for facebook. If you are looking to use the Graph API tho, bear in mind that it is just a REST API that uses oAuth for authentication, much the same as Twitter, SoundCloud etc.
The most awkward bit I found was authenticating properly so I would suggest checking out the oAuth website
http://oauth.net/
They also have some PHP samples which were what I used as a starting point. I'd definitely recommend starting from these rather than trying to build your own setup from scratch.
http://oauth.googlecode.com/svn/code/php/
I also found it handy to refer to the docs on some of the other sites that use oAuth, such as Twitter and SoundCloud as it helped build my overall understanding of what is going on, even if there were a few small differences from one site to another
http://apiwiki.twitter.com/Authentication
http://wiki.github.com/soundcloud/api/02-authentication
Personally I would suggest just trying to do a basic oAuth-authenticated request to begin with. Facebook Graph has a few extra options such as using scope for extended permissions. Whilst you will probably need to use these in the end, once you get your head round the signing mechanism its easy enough to add in these extra details.
Once you have got the hang of signing requests, it is just a case of requesting the appropriate endpoint for what you want using either curl or any other method that takes your fancy.
Hope this is of some use