Custom Facebook Like Box in PHP - facebook

I know that I can embed Facebook's own Like Box on to a web page, but as many people have found out it can no longer be styled as much as you used to be able to do (removing the border is about the best you can do it seems).
So I was wondering whether it would be possible to build my own customised Like Box so that I have control over the styling of it, and make it fit in with the design of the web page it needs to go on?
I've been attempting to work my way through the Graph API documentation on the Facebook site and know how to get some information such as the number of "likes" a page has and other information about the page itself, but I can't seem to find out how to pull a random number of profile pics for people that have liked the page (the same as how it works on the Like Box social plugin basically).
Thanks.

Related

Programming Facebook "Status Sharing" Features for a CMS

I'm working on some new features for a CMS, and I'm having trouble finding the information about how Facebook interacts with other websites. If turn key solutions exist for this I'd love to hear about them, but I'm basically just looking for pointers to documentation of how this stuff works behind the scenes. Including php, wordpress, and drupal since those are the base technologies I'm working with, but other platform solutions are welcome.
When you paste a URL into Facebook's "What's on your Mind" box, Facebook will automatically fetch a short page description, as well as a list of possible thumbnails. If there's a video it will often auto-generate the needed HTML to embed the video. I've also seen features where you link to a business's main website, but then are prompted to "like" their Facebook page.
How can I, as an independent website owner, have my pages reacts to Facebook in this way. For example, on the following page (link to a personal website) I have four images. However, if I drop that URL into a Facebook status update, there are no thumbnails for those images.
Also, while I've inferred several features of the notification box, I'm curious if there's other's I'm not aware of.
Again, while turnkey solutions and existing plugins are of interest, what I'm really after is what sort of meta data I need to embed in my own page, or what special responses I need to make to Facebook requests. In other words, how do I program a website to response correctly to Facebook.
Basically you convey that information to user in terms of open graph meta tags. From that Facebook picks up what type of site it is. Is it about a book or some music or some commerical brand or may be has a FB page linked to it? Check this documentation for general idea about graph objects - https://developers.facebook.com/docs/opengraph/using-objects/
Coming to specifically the image used as thumbnail, it is specified with og:image meta tag. Important thing to note about it is that FB caches that for ~24hours so don't sweat it if it doesn't show up. You can use this tool to check for your values which fetches it in realtime - https://developers.facebook.com/tools/debug
Also Facebook happens to have quite a lot of bugs around this, so it might take really long before it start showing up. If its picked up debug tool, then you are fine at code level. Not much that you can do about it.
I happen to know about this as I authored a tiny WordPress plugin for that and boy I know the support requests that used to come in. http://wordpress.org/extend/plugins/facebook-like-thumbnail/
Now for 3rd part of your question, even this is specified through meta tags only, like you have primary video content on your website, and you would like it to embed on Facebook when someone puts a link in the status box, so for that this link has code samples http://garethhooper.com/articles/social-media/45-integration/166-how-to-embed-your-own-videos-on-facebook-using-the-facebook-like-and-share-buttons.html
Hope that sets you on track giving you a head start :)

Application vs. page

I have registered an application for a website of mine. This is used for placing a like button, adding posts to visitors' streams, etc.
But this application does not show up anywhere and it does not seem that people can find and 'like' it.
So I created a page for this website/community.
Can I somehow connect these two, so that the existing 'likes', 'fans', etc. are moved to this new page? Or am I supposed to have and maintain both?
Your Website and a Facebook Page about your Website are two separate entities. Their Likes counts will be separated and there is no way to merge them.
A lot of people make the choice to only promote the Facebook Page about your Website as that allows them to share things with fans on facebook and to be visible to facebook visitors.
When making this choice, it's better to display on your website a like button targeting your facebook page instead of a like button targeting your website's url.
I don't think so and I searched it for I while cause I too wanted to connect these but did't find A way for this.
So its better to maintain them both simultaneously.

What's the difference between a Facebook app and a tab?

I want to add a link to my Facebook page that will open new information within my page. Not a website, but information from a scoring program my bowlers use. I'm not a programmer by any means and have no programmer on staff I am trying to teach myself these things as I go along.
First of all, I have no idea if what I want to add is called a "tab" or an "app." I can't really seem to find a good explanation as to what the difference is. They both kind of sound the same to me. I've tried to figure out how to add both and have found a lot of great websites and information on Facebook that kind of leads you through the process.
The problem is all of them seem to expect me to already know what things like, JavaScript, canvas urls, FBML, etc... and I don't. So I'm getting tripped up on the steps even as I'm trying to work my way through the steps. I guess I'm kind of looking for a page entitled something like "Facebook developing for ignorant people."
I really appreciate any help you can give me.
Please forgive my ignorance here but I have searched and searched for how to do this and just keep coming up against a wall.
What are Facebook Tabs?
The tabbed structure multiplies your possibilities. Tabs help keep Pages organized so people know where to go to get different pieces of information. The Wall tab is for dynamic content, the Info tab has static information, the
Photos tab contains photos albums and Fan photos, etc
What are Facebook Apps?
Apps on Facebook are web apps that are loaded in the context of Facebook in what we refer to as a Canvas Page.
What is a Canvas Page?
A Canvas Page is quite literally a blank canvas within Facebook on which to run your app.
Now where you may have been confused is that you have ability for your app to be used within the context of a Facebook Page via a tab. So it is a custom tab
So now to what you want
I want to add a link to my Facebook page that will open new information within my page.
You want to add a new piece of information to the page. Is it static content. If it is just the rules of the scoring program, then you can use a Tab. Previously one was able to accomplish this using a simple FBML tab. Put Facebook has phased this out.
FBML will no longer be supported as of January 1, 2012
Two quick ways to deal with your problem
Use the Info tab description to place the information
Search for apps that offer this functionality for example TabPress
The longer way (long term) would be to follow this guide and bite the bullet for learning web hosting and development
http://developers.facebook.com/docs/appsonfacebook/pagetabs/
Any more information in terms of languages, and steps depends on exactly what you would like to do. I am not really sure what you mean by showing the bowling information. For the moment I am thinking it is just static information. So all you need to know is how to use the following HTML tags
html
head
body
p

Easiest way to create a Facebook application

I need to create a simple tab page with custom content inside. How on earth I can get there the shortest and easiest way? Maybe I want to track the users who liked the page, but that's not compulsory. I just want to create a tab-page, which can integrate into a page and shows some custom content.
I have created an application at Facebook, the thing is, I don't know where to head from here, to include some content in the innards of that page...
I guess you want a static FBML tab. It is hard to find on Facebook, however it is possible to find a link like this. If you are logged in to Facebook then it should take you to a page where you can add a static FBML tab to one of the pages you administer. After that you can customize the tab content from page settings.
A page tab or any application on facebook can be and usualy is considered a normal website. You'll need the same things that you would if you wanted to create a website. You'll need a server, some storage space, possible a database (if you want to store date about/for your users).
There are ways to get started for free - lots of free hosting companies out there. You can start your search here
Facebook also has links to [develop applications in a cloud system].
There are different types of facebook apps, but one of them is just a canevas app.
So you ca include an external web page in a facebook page. It's pretty similar to a frame i think.
You can find inforations here: https://developers.facebook.com/docs/guides/canvas/#canvas

Become a fan of a Facebook page through the API?

I'm writing an iPhone application. I've seen widgets you can place on your website that users can click on to become a fan of your page. However, looking through the API or documentation, I can't find a way that you can facilitate "becoming a fan" through an application. I've spent about a day and a half pouring through the Facebook API docs and the cloud.
Has anyone else had success with this?
For example, say I was writing an app that listed cars, and I wanted to become a fan of the Delorean from within my app -- is there a way to do this?
If there is no solution, the alternative way I can think of is using a webview and linking to a page with a fan widget.
Fan'ing via the API is currently not possible.
Most probably, the reason for this is it would be to hard to avoid developers tricking users into become fans.
The only way is the Fan Box plugin. It's possible to remove all elements via CSS to leave just the button.
Most Apps either use the button or simply link to the page.