How to Style Facebook Activity Feed - facebook

How do you implement custom css on a Facebook activity feed plugin? This related post does not fully answer the question. Is this the right way?
Where does the
<fb:tag name='link'></fb:tag>
go? Inside of of the
<fb:activity site="..." app_id="..." ></fb:activity>
outside of it, before or after? I'm sort of confused...

the only way i use activity feed is when its in a widget that will generically upate in all posts. Anyone who inserts these snippets into blog posts or other 'hard to find and edit later' posts and pages, will regret it
Why?
Because Facebook changes their script every month or so and the script snippet you inserted wont work anymore
I have hundreds of blank areas in blog posts where i inserted an activity feed and the script always stops working after some weeks when fb adds some code or changes the location of some script or renames a file and the old script has no canonical or generic way of readjusting.
There is no point in using a script which gets made obsolete every month and you then need to find all posts where you inserted the snippet and change it for the new working code.
Im always having to reinsert new code into my fb social widgets because they cease to function...
Not viable unless you take it into consideration. Only insert in spaces where oyu wil notice it when it stops working

As Facebook Answers answered, you cannot really style it with a custom CSS, nor via JS, as the activity feed widget creates an iframe.
The info from martincarlin87 is useful, but that is not exactly what you get with the Activity Plugin, which is what you meant I guess:
http://developers.facebook.com/docs/reference/plugins/activity/
For using this you cannot really interact with the Facebook API, it is a little world apart. By now... (July 12th 2012)

Facebook PHP SDK: https://github.com/facebook/php-sdk
Comes with some simple examples, I would suggest uploading it to your server and tinkering with it, Facebook has a steep learning curve but here at Stack Overflow there is even a Facebook section: facebook.stackoverflow.com so just take each step at a time and if you can't get it by reading the facebook docs: developers.facebook.com then you can always ask here and I'm sure someone will be able to help you.
Getting Started: http://developers.facebook.com/docs/reference/php/
Once you have made an app, you add it to your fan page and then you will be abel to test what information you can get using the Graph API Explorer: https://developers.facebook.com/tools/explorer

That post you refer to is a red herring I'm afraid. If you put any HTML between the activity tags it gets rendered BEFORE the iframe is added. So its a no starter, from what I can see. However, I eventually found a solution, which I gave on that thread. I am repeating it here in case somebody searching doesn't see the other thread.
I managed to customise an Activity plugin, after a great deal of effort.
You can see the result here:
http://www.quniverse.co.uk/shopdata/about_us.php
Feel free to post a comment on that site, it exists purely for test purposes so I'm not fussed what goes up there provided its clean.
I explain how I achieved this in the blog article posted here:
http://facebookanswers.co.uk/?p=302
To summarise briefly:
You cannot insert CSS into the activity plugin.
Rely on the fact it has a transparent background, and supply your own.
Turn off the header and supply your own.
You can specify a light or a dark font, a few fontfaces and a border colour.
If you read the blog article you will get a full explanation.

Related

How to display ALL Facebook Comments on my Blog in ONE place?

Yes, before you ask, I need to clarify that I looked a possible
solution up but that wasn't what I'm trying to achieve.
What I really wan't to do cannot be explained in a few words so I'm going to give a short verbose explaination.
Like this familiar interface of comment-tool in facebook's developer site , I want to be able to see people/pages commenting on my different posts(webpages) in a single static page onmy website.(Pictures below):
Image-1: Comment-tool interface on developers.facebook.com
Image-2: Image of people commenting on some webpage displayed beside their name... and subsequent comments on different webpages following it
Ofcourse, I could use the comment-tool present in developers.facebook.com but that gives me access to me and my collaborators only. I need any visitor to be able to see what people are commenting on different posts, in a single page.
Since, this feature is already an option for comment-tool/app admins and moderators, I stand within reason to think that there must be some way to do this publicly too!
tl;dr version:
I want to bring the comment-tool interface found in developer.facebook.com to a webpage on my blog. Can anyone help me? I might drop a bounty if I really like your soultion :)

Add-to-timeline deprecation on Facebook. How to replace it?

According to the docs, the "Add to Timeline" button will be deprecated as of August 2012. Unfortunately, there is no guidance on how to achieve the same functionality. Perplexingly, the Open Graph tutorial uses the button (which seems unwise given that it will be broken in a couple months). Since I'm writing a new implementation of actions/timeline right now, I'm not going to include something that I'll have to delete in a couple months. Everything works fine with AJAX and the PHP-SDK and only two issues remain unresolved (which I imagine the button would handle):
No way to tell if an action is posted already. I have "unique" enabled already but I have no way to hide the "Add to timeline" option if it's already posted.
No nice visual. I could render the current (soon to be deprecated) button and steal the image but I'd prefer to use something that will look the same as other sites and make users comfortable that they know what will happen when they click.
Does Facebook have a replacement for this button? Or are all timeline posts supposed to be taking place silently after an initial permission grant? I thought Facebook encouraged more user approval for Timeline actions--where is that control supposed to go? To third party UI elements? Doesn't that undermine some of the power of the Facebook ecosystem--the fact that it's the same buttons with the same behavior everywhere on the web? It's kind of frustrating the way it's presented now--pushing you in one direction in the tutorial only to tell you that the feature will be deprecated within months. I've mostly given up hope for problem #1 but is there an official non-deprecated button that will give me a nice comforting visual?
Also, are there other features that this button does that are being/have been transitioned to other plugins?
EDIT: Does it make sense to link the "Like" button to a timeline event? It seems like semantically that would make sense but there doesn't seem to be any built-in way to do it.

Can Facebook/Google cause site to not load?

This might sound like a silly question, but yesterday none of our sites would load. After contacting the hosting company they said that
In this instance, it would appear that your site is hanging waiting for a response from an external component / website (looking at your code, I see references to Facebook, Google and online apps at a glance).
We've never had this problem before and the sites have been using the social plugins for months so I wondered if anybody else experienced this problem yesterday?
Thanks
Without knowing the details, I can tell you that when you load Javascript via <script></script> tags the browser waits for the request to finish before moving on. So, if you load JS files in the <head></head> section, nothing will render on-screen until they load successfully. 404s here will kill you, as will slow connections.
If you have in-line JS, it's best to put it at the very bottom of your <body></body> section so that it does not interrupt browser rendering. Do this for JS files in your <head></head> section if your code architecture allows it.
Just a random stab in the dark but I wonder if this was related in any way to the anonymous threats on Facebook. I have experienced similar problems before with a twitter plugin, it could take a few seconds for the plugin to ping back the tweets and the rest of the page was hanging while twitter was doing their thing.
To ensure this doesn't happen again you could call your social plugin's on page load if its a viable solution. At the end of the day do you want your page load time to depend on other services outside of your control or not?
edit: #Jason McClellan 's answer is spot on. I believe the combo of out answers sort out your question. I Never include script in the head if I don't control the resource! That can indefinitely hang your page.
edit2: Don't know why I'm getting down rated for this answer was just trying to relate it to an experience of mine. I'm not extremely experienced with Facebook plugins but when I was noticing an issue with my twitter plugin, I did exactly what #Jason McClellan has said with his answer to make sure that all your html gets rendered before the scripts are even requested, then ensured that the page could display correctly with or without the twitter content so the user experience was not dependant on an external resource. The twitter plugin I was using had an initiation function which I had to call to fire up the script. The simplest way to call this would be with:
<body onload='init()'>
if you have another script you are loading with the page you could use something along the lines of
window.onload = function() {
init();
}
from within your external script.
Sorry I can't give an answer specific to the Facebook plugin. Maybe someone with more experience in the Facebook plugins could elaborate in the comments :D
edit3: also this community based tool suggests that quiet a few people where seeing a bit of facebook downtime when you experienced it - Facebook status at DownRightNow
edit4: I dont have the "Privelages" to comment on Jason's q as im pretty new here ... but in answer to your comment there, the stuff in the head that you describe is what loads in the schema for facebook mark-up language (fbml) , so a mark-up language like html, but geared up for you to use the facebook api. So you can do stuff like:
<fb:comments xid="titans_comments" canpost="true" candelete="false" returnurl="http://apps.facebook.com/myapp/titans/">
<fb:title>Talk about the Titans</fb:title>
</fb:comments>
To wack some comments straight into your page - fbml developers guide
Your comment there also suggests you are not including a script for your page to load so it renders our previous answers not as important, you need to include the fbml stuff in the head before you use fbml in your page so don't move it :D
but #jason McClellan's answer is something that everyone should do on their project (unless there is a reason not to) as it allows for the user to see something before the browser fires off requests for the scripts. At the end of the day we're in this game to make pretty stuff for our users!
Good luck

Up to date instructions for September 2011 onwards for beginners

Sorry for this basic question but all attempts at Googling and using facebook help only provide out of date information.
I am attempting to make my first fb app. Just an html page saying hello. From what I understand the app (or webpage) is stored on my server and I set up a facebook app that basically points to the URL of the app (or webpage) on my server.
Is this basically correct.
Where do I enter this URL information in my edit app screen. I have followed the latest fb instructions and all I see when I view the app is the admin page in fb for the app.
Does it take a long time for the page to appear.
Is there a current idiots guide. The app design is not a problem for me loading it in to facebook is the problem.
Unfortunately this wasn't very helpful, not because of what you posted but due to the fact that it appears that Facebook has updated the way in which pages are linked to again.
The pages you suggested I look at were well laid out with lots of information on them but they are already out of date and do not seem to correspond with the layout of the Facebook 'dev app' and even the fields in the form seem to have been either dropped added to renamed.
Thanks for trying to help me and I hope that FB may produce some up to date information soon and not keep changing the interface.
I can completely understand your confusion - the Facebook docs give very little information for the complete beginner. The 'Getting Started' section makes some massive assumptions and completely ignores huge key areas you need to know to get your first application up and running.
So to address your points:
Yes, this is basically correct. Apps on Facebook are served up to the user in one of two ways. Either as a 'Canvas App' or a 'Tab App'. A Tab App is an application you can install as a tab on a profile page. A Canvas App can operate on it's own page and has more room as there's no left menu as you would have on a profile page. You can configure a single app to work in both ways.
To edit your application settings, go to your own Facebook home page. Use the search bar to search for the 'Developer App'. Typing in 'developer' should do it - it should be the first result in the App section with around 830,000 monthly users. This Developer app is the window into your own app settings. You need to install it if you haven't already. It's a hub where all the apps you create will be available for you to edit. Whenever you want to edit one of your app settings in future, you click the Developer bookmark that will now be in the left menu on your own Facebook home page.
No. Apps are basically an iframe onto your code. There should be very little if any wait at all. Start with something very simple like spitting out some straight html so you can easily tell if things are set up correctly.
Yes. I found thinkdiff.net to be massively useful in the early days to get my head round the basics and then more advanced concepts. There's tons of examples ranging from very simple to quite advanced. I've just had a quick look around and found this page which should give you a decent head start in getting things moving. Note: I have no affiliation with thinkdiff.net at all - I just found them helpful in the past.
Finally, a request from me; this whole stack overflow thing is new for Facebook developers and very few people are voting up answers they consider helpful. This means new users to SO but experienced FB developers can't vote up good answers and vote down bad ones as we need enough Reputation Points to do so. If this has helped you, please ensure you vote up the answer. Of course if it was rubbish and you're just as lost, dont :D
Hope I've helped in some small way; I know I was completely lost for the first few weeks with FB development and even now there are things that make me tear my hair out! In the end it's very rewarding, but you have to put in the time. Good luck :)

Wordpress/Facebook Comments are displayed overlayed on Wordpress blog

I need help with a problem I'm facing, basically I'm utilizing the new "Facebook Comment Box" feature and the issue is it is overlaying with standard Wordpress comments. It is best described by showing you the following screenshot:
Because I'm new here I couldn't post a screenshot because I don't have enough rep so a link to the screenshot of the problem is here - http://www.wdbc.org.au/comment_screenshot.jpg
The true URL for the above screenshot is here
So I did some investigating around, I couldn't find anyone else who came across this problem, but I also found that it is a combination of factors which makes encountering it more rare. Below are some specifics on what I'm using, and factors I believe are contributing to this problem:
Wordpress 3.1
Wordpress Theme Genesis1.5
Wordpress Plugin Facebook Comments for WordPress 3.1
Wordpress Plugin The Events Calendar 1.6.5
Google Chrome Browser 10.0.648.204
Some important notes on this problem:
It does not happen for the same URL in Explorer or Firefox, only in Chrome
It only happens in Wordpress posts tagged as Events so the events calendar plugin is definitely part of the issue here (for example I don't see the overlap issue on a non-event post which does not utilize the Events Calendar plugin)
My thoughts:
The plugin "The Events Calendar" has something to do with this. The plugin adds some information at the top of the post such as Date, Address, Cost, etc, and the height this information takes up seems to be about exactly the height the wordpress comment is encroaching on the space of the facebook comment section.
I don't have enough Wordpress expertise to dig deeper in to this and determine what is wrong with either the Events plugin or the Chrome browser and I'm not really sure where to start. I would really appreciate if anyone can help provide some tips or guidance on how I could progress with this issue. If you need any further details just ask and I would be happy to share, thank you.
Edit: Same problem observed in Safari (on iPhone) so impacts Chrome/Safari not Firefox/Explorer.
Edit2: On further testing it looks like this is only impacting retrospectively. I created a new Event post and it works fine, but older Event posts are affected. I guess this makes the issue not as impacting as I first thought so I might be able to live with this.
It might have something to do with the like button. I use a plugin for wordpress that also includes the like button. I chose to hide it, and all is good. I will enable the like button using another plugin.