Facebook like button on pages that are accessible from multiple urls - facebook-like

I have a website that is accessible from multiple domains, like mydomain.com, mydomain.net, mydomain.org, etc. and also I'm using rewrite to create search-engine friendly urls, like /news/12345-news-alias and only thing that is important in url is the item ID. So if you open mydomain.com/news/12345 you will get the same page as if you open mydomain.org/news/12345-news-alias.
I've inserted facebook, twitter and Google+ like icons in my page, and the problem is that when you open mydomain.com/news/12345 it shows 260 likes and if you open the same page via this address: mydomain.org/news/12345-news-alias it shows 0 likes.
What can I do to make facebook understand that these pages are the same?

Related

Redirect Human User, but not Facebook Crawler

I have a simple Django site, with 2 pages. It is kind of like those stupid buzzfeed quizzes. There is a questions page (www.mypage.com), and a results page (www.mysite.com/results/myResults). I am trying to use the facebook share button to drive social sharing. I want people to share the results page (e.g. "I got this result, what about you?"), but I need incoming users clicking these shared links to be redirected to the main questions page.
I have tried adding a URL parameter www.mysite.com/results/myResults?fromShare = T and using a view to redirect these to the main page. However, the facebook crawler also gets redirected, so the shared content ends up being the main page, rather than the individualized results page.
tl;dr: how do I redirect incoming human users, while not redirecting the facebook crawler? I would ideally like to do this in a django view, rather than .htaccess.
Facebook user agent will be one of these:
facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
facebookexternalhit/1.0 (+http://www.facebook.com/externalhit_uatext.php)
facebookexternalhit/1.1 (+https://www.facebook.com/externalhit_uatext.php)
facebookexternalhit/1.0 (+https://www.facebook.com/externalhit_uatext.php)
Look for these in request.META['HTTP_USER_AGENT'] and redirect.
In your view, look at request.META['HTTP_USER_AGENT'], compare it to Facebook crawler's, and redirect if it doesn't match. If it does match, serve your page template.

Can I prompt a user to log in to facebook through a bookmarklet generated div?

I'm looking to see some info about my facebook contacts, and I want the info to be overlayed on the currently open website.
Currently, I'm trying to do this via a bookmarklet.
Is it possible for me to overlay a div over the currently open web page and populate it with a functioning facebook login button (if the user is not logged in)? Are there publicly available working examples of something like this?
It is probably not possible to simply embed Facebook within an iframe because Facebook blocks people from embedding their pages within frames or iframes by putting this into the response header, "X-Frame-Options: DENY". This is most likely to prevent click-jacking and similar security exploits.
To test this, enter any page from Facebook into http://savanttools.com/testframe
Facebook has an API which allows you to do many things, but it requires server side code, and can not be done simply with a bookmarklet.
There is also always the brute force method where your server scrapes data from any website you want it to. Then that data could be put into a bookmarklet.
Finally, the same thing could be achieved by writing an add-on or a user script without using a bookmarklet at all.

Open Graph Protocol, Facebook App & Facebook Like Button on Website

So I set up an App to handle open graph protocol setting for my website. I embedded the open graph protocol metadata into the site and I added a Facebook like button that ties to the home page. I ran it through the linter and everything looks good. But when I look at the administration interface in Facebook, it shows a different number of "likes" than on my page itself. Also I thought by setting it up in this way I would be able to see who liked my page as well. Finally, when I go to my website and I am logged into facebook, it does not show an "admin page" link which I thought it is supposed to do. I have been looking all over the Facebook developer documentation and cannot seem to find an answer. Thank you!

What's the difference between the Like button with or without Open Graph META tags?

I have a very basic website with the potential for having hundreds of pages, and would like to have a the Facebook Like button on each one.
However, before I do it, I would like to know the difference between inserting the Like button with, or WITHOUT using Open Graph META tags.
I don't want each page that visitors 'Like' to become their own Facebook pages, but I WOULD like their 'Like' to show up on their wall so their friends can see it.
Is the only real reason for using Open Graph to specify what exactly it is that you want to show up in the message and 'Like' post?? (example: 'Dave likes The Rock - IMDB' with a picture of the movie and a description underneath.)
#Vali What you are suggesting:-
Including Open Graph tags on your Web page, makes your page equivalent to a Facebook Page. This means when a user clicks a Like button on your page, a connection is made between your page and the user. Your page will appear in the "Likes and Interests" section of the user's profile, and you have the ability to publish updates to the user.
is not possible. Kindly see my similar question:
Convert my Site to Facebook Graph Object
As you said you can add a Like button without OpenGraph. That's the easy way and with that you don't have any future connection with the person who liked your link/page.
Including Open Graph tags on your Web page, makes your page equivalent to a Facebook Page. This means when a user clicks a Like button on your page, a connection is made between your page and the user. Your page will appear in the "Likes and Interests" section of the user's profile, and you have the ability to publish updates to the user.
Using Open Graph you have a greater control on what you want to appear on that person's wall.
Open Graph is still beta. If you want to use OpenGraph you need to create a FB app, get the APP ID and add it to your webpage. If you want to use the simple Like button, you just add the fb:like tag and that's all.
don't want each page that visitors 'Like' to become their own Facebook pages
This will not happen. You're the single admin of your page.
Is the only real reason for using Open Graph to specify what exactly it is that you want to show up in the message and 'Like' post??
Yes, you can do this with Open Graph. I suggest using Open Graph if you want to post enhanced wall posts and if you want to get connected with the users who likes your page.

capture https web page that user is viewing in his browser

I am developing a Desktop application that allows the user to capture the contents of a web page loaded in web-browser. I take the URL from the browser, then load the contents into my WebView and then create image out of it.
It works fine with http URLs. The problem comes when I have to capture https URL contents.
Suppose I have a login page with https URL displayed in the browser, I get this URL from the browser and try to load it in my web view. I get the following error :
"The certificate for this server is invalid. You might be connecting to a server that is pretending to be “” which could put your confidential information at risk."
If user has logged in to a web page and viewing some contents in Safari browser. Now, if he wants to capture the entire web page, he comes back to my app.
But, my app is not able to capture these contents. The reason is that, once user logs into a site, cookies are written into his system and this is browser specific. Hence, my web view is not able to directly enter into the page that user is viewing in the browser.
Even though technically it sounds right, user will not accept this behavior in my app.
How do I solve this? Is there any alternative method to capture the entire web page that user is viewing in the browser?
Thanks and Regards,
Deepa
You could investigate making your application a browser plugin for those browsers on your target platform.