Is there a way to get my latest facebook message +comments to show on my own website?
I would recommend looking into Facebook Connect, which provides API's for exactly the functionality you're looking for.
Facebook has fairly well-documented developer resources; you can get started at http://developers.facebook.com/, which should lead you to a few options for what you want to do. In the deeper integration stuff, PHP integration is pretty well-supported, so you should be able to find good information.
Once you've gotten a handle on the general structure of their API/Connect framework, the specific information you need is in their dev wiki documentation for Message (FQL).
Related
How can I search people by according to their interests? Is there any feature in the Graph API, or is there any API available to do this?
I need to integrate this feature with my php project, so kindly let me know if it is possible with php.
I don't think so yet, because it's still a beta feature that you can enable through your account. Meaning that not everybody is using it yet, so not many results will be shown if that api was available now.
Recently I've read a number of articles talking about the idea of using "feature toggles" or "gatekeepers" to keep features hidden from users until the development is done. Facebook and Flickr both also talk about how they use this to test new features with a subset of users before unleashing them on everyone.
A bit of googling didn't turn up any existing PHP packages/tools that can be added to a web app to handle this type of thing. It seems straight forward enough to roll our own but no reason to re-invent that wheel if we don't need to. Are there any existing PHP tools to do this?
Articles
Feature Toggle by Martin Fowler
Flipping Out on Flickr DevBlog
Clarification: The part of this that I'm looking to see if it exists is the admin panel that controls which users can see the new features. In Flickr's example, they can turn it on based on the host. In the Facebook example, they add functionality such as limiting a feature to 5% of users, only TechCrunch users or only East coast users.
The admin panel seems crucial when you have 200 turned on features, 10 features that aren't quite done yet and 3 more that you're demoing for some users.
if (user_can_see_app()) {
show_app();
} else {
dont_show_app();
}
I fail to see why a package would be required for something so simple.
I've wrote a micro service for feature toggle pattern, called Bipolar:
https://marinho.github.io/bipolar-server
It is written in Python but that doesn't matter because it is an external API and Admin interface, so, all you need is to write a PHP client for it. We have used it in production for a while but only worked on public release and documentation recently. For JavaScript support it can push notifications using Webhooks as a basic URL call or via Pusher event.
I am bit missed after many years with no contact with PHP, but I can help you to write the client if you are interested.
I hope that can be helpful.
The easiest solution i found is to have the feature toggle state stored in some remote location that can change easily (turn it on/off)
I found it easy to have on GitHub a repo holding some JSON data with the feature toggle's state, later on you can change that state on GitHub (from phone/pc etc...)
your php code needs to fetch the JSON and make a decision from it ...
you can look at the blog post about how to achieve this:
http://www.nimrodstech.com/dead-simple-feature-toggle/
it shows a code snippet of how to achieve this in a simple way.
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