I am creating application on localhost (XAMPP). When I try to test LIKE button this error pop ups:
**Message Failed: This message contains content that has been blocked by our security systems.**
Either the URL you wanted to like is blocked by Facebook or you are trying to like a Link on localhost - which is not possible, of course. You can only like public URLs.
Put the URL in the Facebook Debugger to check if it´s available: https://developers.facebook.com/tools/debug/
You can also just try to post it on your own Facebook Wall to test if it is blocked.
go to the link given below: https://developers.facebook.com/docs/plugins/like-button
Type your link in URL to Like. for example: https://www.facebook.com/games/rajvirbalapp/
Type width in next input box.
Select your Like button Layout from drop down. For Example: box_count.
Select Action Type from Drop down. For example: Like.
Tick Show Friends' Faces or Include Share Button if you want to show share button.
Click Get Code button and copy the script and paste where you want to show the like button in your website.
If you use localhost then it will display error message other wise it work's.
Best of luck.
Related
I will try to explain a bit the context for my problem.
Context:
A while ago I started working on Facebook application. One of the requirements is to be included in a Facebook page as a tab. This application will contain on a page a send button in order to be able to make it more engaging with specific people, users of the application would choose on their own. The reason behind this is because the Facebook page containing the application is related to alcohol, and "liking" the application will get more audition and potential children. Another reason for using send button rather then other similar options from Facebook (like send dialog etc.) is because in Facebook documentation was stated that send button works on mobile devices and other options don't.
Problem:
My problem is related to the send button. What I need is to be able to completely configure the send button: url, image, title, description. I have research the open graph tags in order to be able to do this. Everything works fine if the page I want to be sent with the message is a website OUTSIDE Facebook. Once I started to use the url of a Facebook page (let's call it www.facebook.com/mycustompage), then the crawler takes the images, title, description from facebook.com ignoring the actual page and the produced message is not what I want.
I have searched a lot to better understand this limitation and could not find anything relevant.
The only article I could find as a potential solution was (and even this I had trouble finding):
Send button returning error codes, like button works fine
The above discussion is a workaround which I have already put in place but is not 100% what I want. The described workaround is about putting in the send button:
<div class="fb-send" data-href="http://www.mycustomdomain.com/og"></div>
a page that sniffs the user agent. In case the user agent is Facebook crawler to serve an html empty page just with the open graph tags, otherwise redirect to the desired URL - which in our case is the facebook page www.facebook.com/mycustompage.
The message produced contains:
the title which is a link to www.mycustomdomain.com/og which when
clicked opens a page in a new tab with the address
www.facebook.com/mycustompage - this is relatively ok
under the title I have a "sub-title" readonly text containing the domain of the link: www.mycustomdomain.com - THIS IS NOT OK since I don't want to share where I have hosted the application.
the image and the desired description - this is ok.
Conclusion:
What I want to know if there is a better way to do this rather than this workaround.
If not I would like to know how I can hide for the produced message the "sub-title" so that the hosted domain is not visible.
We are using a facebook like button on a gallery page. When you click the like button, the parent page information is provided instead of the "item" information - but when the link is shared individually on facebook, it pulls the right information.
I tried using Facebook's debug tool, and it pulls the correct information.. the issue seems to be when its on the page. I've checked the meta info and it all looks right...
Any ideas?
https://developers.facebook.com/docs/reference/plugins/like/
Put in the correct sub-link and generate the like button again > Test it first, directly in the like button generator.
If the data is shown correctly in the debugger, then i am pretty sure the problem is that you don´t use the correct/same link in the like button. It would be important to see your usage of the like button. It´s possible that you have an escape character problem, so only the basic link is used.
I have a music app that I developed using HTML5's canvas. As different songs are selected, I have jquery that dynamically updates the URL in the browser to point to the correct song. I also have jquery that updates fb:like element. By using the debugging tool, I'm able to cache the pages (since my server is able to return correct meta-data for each URL provided).
When I do this and like something on my website, I end up with a message saying "Sami liked a page." with some info underneath.
Next, I use the Open Graph curl commands to add a Recommend action (something I've created) to a given URL from my website. Now, when I like the same url, I end up with a message saying "Sami recommends this link" with some info underneath.
What I'd really like to do is have this message display "Sami recommends a song on website", which is what the message looks like when I look at the preview for my Song object in the Open Graph. Is there any way to do this?
Best,Sami
EDIT: probably good to note that I'm also getting some extra meta info from the website (such as og:site_name), but that this stuff is not being saved into the Actions portion of my Open Graph (as in I can't view that info using the Open Graph link to view my current Recommendations), though I can see it using the debugger tool.
The facebook like button "triggers" the most generic action which is the like, you can how ever change the like button to use "recommend" instead of "like".
In the documentation for the like button, in the attributes table you can see the "action" attribute which is:
the verb to display on the button. Options: 'like', 'recommend'
Also when you "Get Like Button Code" thing you can select Verb to display.
If you want to use your own actions you'll need to define them in the app settings page as explained in the Define Actions guide.
When I enter my webpage into the "get Like button Url to like" on Facebook's Like Button Generator, it tells me that the href entered is not a valid url, when in fact it is.
How can I get the url for my webpage without this application?
Use the like button generator to get the code for a site you know, like www.google.com
Look through the code and replace www.google.com with yoursite.com
Once you have you like button set up, you should set up Open Graph meta information, and you can test that everything is set up properly using the Facebook Debug Console
I used to be able to construct a link like this:
http://www.facebook.com/connect/prompt_feed.php?message=hello
It would go to the page it currently does (click on the link to see) but it used to pre-populate the text field with the value of the message parameter. Now the text field is empty.
I suppose facebook changed this functionality, but is there a replacement that provides the same functionality? Note that I do not want to have to authenticate the user or connect them to an app. I am looking for a simple url that will just open a new window with a status message pre-populated so the user can just click "Share" (exactly how this prompt_feed.php used to work). Anybody know of a way to do this?
What about the feed dialog?
See here: https://developers.facebook.com/docs/reference/dialogs/feed/
Update: Ok, now I see that the user must have already authorized the app : [
Update 2: This isn't either a full replacement but an alternative - you could use the sharer php
http://www.facebook.com/sharer.php?u=yoursite.com&t=yourtitle
In that case yoursite.com should contain og meta tags. It does not prefill the message though : [