Anyway of knowing if a tab app is loading in the new timeline? - facebook-graph-api

Is there anyway to detect if the tab app is being loading in the new timeline or not? I got clients asking to upgrade my layout but not all of them have upgraded so it makes it hard to do that. If I had a way to detect this it would be perfect.

I managed to do that by looking for an album called "Cover Photos" on the album list of that page. Here's a sample:
http://graph.facebook.com/-page_id-/albums?fields=name
You don't need a token unless the page isn't published yet.
The problem with this approach is that some pages still don't have cover picture yet, but it's the minority.

Related

How to add a facebook-like button in a responsive website?

I am working on a new version of our website, based on a commercial framework (Aspdotnetstorefront) with a responsive template.
We have a few pages where we want to include a Facebook "like button". I tried to use the same code we have in our current site in the new responsive version but it's ruining the design (its width disregards the limit of the device screen size and so the contents of the whole page is cut).
The code we have is the one auto generated by the Facebook developers page (it creates a class called 'fb-root').
I checked the Facebook developers page and the solution they offer is still the old one I have, or in other words, completely useless.
I would like to know if there is any available version that WORKS.
Thank you!
PS: This "facebook like button" RIGHT BELOW is exactly what I need as it seems to work very responsively.

Django-CMS sometimes cannot publish a page

I have a site in Django-CMS 2.4.1. I often go into the admin panel and change a page there, e.g. dragging a plugin from one placeholder to another, or just change the details of a plugin.
If I press "Publish draft" straight after this, I often get an error:
PublicIsUnmodifiable: The public instance cannot be published. Use draft.
Alternatively, sometimes I am told that I cannot submit the form as the slug is already taken (by the same page).
I have found that if I navigate away, come back, make the changes again, and press "Save and continue editing", and only then "Publish draft", it often works - but not always.
Also, I have found that I often cannot delete plugins from pages.
Has this happened to anyone else? Has my database somehow become corrupted?
Sorry I can't be more specific, but I thought I'd ask in case others have had the same problem. I am still trying to work out the pattern. The new management command cms check doesn't detect anything wrong.
One thought - I am using mptt version 0.5.5, which is higher than that loaded automatically by Django-CMS (which uses 0.5.2).

How to get external URLs likes

I'm trying to get the list of all the pages that a user "likes", both Facebook pages and external pages.
I know that the facebook pages (such as http://www.facebook.com/DealExtremeFans) I can obtain them with the "me/likes" value from the Graph.
But for a page such as (http://mashable.com/2012/01/20/advertisers-this-is-what-an-nfl-fan-looks-like-infographic/) that has a like button (under the title) I don't see how to get those likes.
Is this possible? If not, are you planning on adding support for this any time soon?
Thanks
EDIT:
According to the response below, even though they are added via the "like" button they are really "Shares".
Now my question is, how do I get those shares? what's the graph for them? I tried "me/shares" but doesn't exist.
Is there a way?
Yes it is possible, but it looks like that URL only has shares:
Click here.
And here is a link to a tutorial for getting the data via jQuery.

Facebook Open Graph OG: Meta Tags - Works only sometimes?

I have a like button on my site, i have defined all the og: meta tags and its works for most of most pages, but doesnt for 2 other pages. Its using a template so its exactly the same code, how can it work for some but not all pages?
For the pages it doesnt work, it doesnt pick up the title, image, link or description, basically any of the meta tags information.
Working like button....
http://www.imoffonholiday.com/holiday.php?id=des_home&destination=faliraki
Not working Like button
http://www.imoffonholiday.com/holiday.php?id=des_home&destination=ayianapa
Any ideas?
One usual problem is caching. If you were testing and at some point had the wrong data in the metatags facebook will cache that info.
One simple wat to test if it is a caching issue is to add a random param at the end of the URL.
so www.yourpage.com/index.php?cacheBust=1
Running the Facebook Debugger often clears those kind of things up. It appears to refresh the FB cache when you do.

Caching data (image, rss) with django

That's my first question in here, I've been looking through old questions, but nothing matched with my problem. Here it is.
I'm creating some site with one main functionality. We want this site to display content of other sites, but in a specific way. User chooses let's say two pages from five and want to see their content. He clicks button 'Display' and goes to next page where he finds let's say view from web cam, and here comes problem.
I want to cache image that is hidden behind the url from which image was downloaded, so after refresh image won't be downloaded again, but browser will get it from cache.
I've been looking through documentation of Django, but nothing seemed to be useful.
I know that I should:
1) create table which stores cache
2) add to settings.py some CACHE_BACKEND = ...
3) use #cache_page(300) before declaration of function which returns content which should be cached,
but... it doesn't seem to work.
I will be greateful if someone tells how to solve that problem, maybe with some sort of code showing the mechanism.
Cheers,
Chris.
I think that right way to do this will be to store image somewhere on your server and delete it later with cron or something similar.
Django cache framework wasn't created for the purpose you are trying to use it.