how to hide site url in facebook when share page? - facebook

when i use comment facebook plugin, then i'm comment in my site page. in my facebook timeline, i see
picture, title, url site, and description.
How to hide that's url site on facebook timeline ?
i'm not wrote <meta property="og:site_name" content=""/> there.
my code show below:
<meta property="og:title" content="<?php echo trim($title); ?>"/>
<meta property="og:description" content="<?php echo $desc;?>" />
<meta property="og:image" content="<?php echo $url_pic; ?>"/>
thanks

you can ommit the description but for users safety I dont think you can hide the sites url. it will allways be parsed from the page plugin is in.

You cannot hide the Site URL when sharing links on Facebook. It's a security feature so users know what domain they will be visiting.

Related

How to change the picture we see on Facebook when we share a link of our website

I've been looking for a while on Internet and coding, but i still cannot personalize the picture when i share article using Facebook share button.
I would like to put the picture of the shared article but instead the plugin show the picture of the author of the article.
Could someone help me with that please ?
Thank you a lot :)
You should use some metatags called OpenGraph, they should appear on the <head> of the html code
Example:
<meta property="og:type" content="website" />
<meta property="og:title" content="place here the title you want to set on the FB share" />
<meta property="og:description" content="place here the description of the share" />
<meta property="og:url" content="place here the url of the page, in php you can use [Note 1]" />
<meta property="og:image" content="place here the url of the image you want to see on the FB share" />
The first one should have website string, don't touch it. The others should be modified by you.
[Note 1]
In php you can get it with:
(isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";

Facebook open graph cannot scraped my website meta tag?

Facebook cannot scraped my website data even though I had provided the meta tag, can anyone tell me what wrong in my code?
Here is my meta tag code
<meta property="og:url" content="https://cyclingevents.my/event/blog/1/3cf2786678c71d93375922900a739d8b"/>
<meta property="og:title" content="I have registered for the Merdeka 12 Hour MTB Endurance 2014. JOIN ME NOW!"/>
<meta property="og:type" content="article"/>
<meta property="og:image" content="https://cyclingevents.my/portal/assets/img/Logo-without-wording2.png"/>
<meta name="image" content="https://cyclingevents.my/portal/assets/img/Logo-without-wording2.png">
<meta property="og:description" content="2014-08-30, 7:00 AM, Bukit Merah Laketown Resort, Taiping">
<meta property="fb:app_id" content="644400718971332" />
Here is my share button code
<a class="btn btn-lg btn-facebook col-lg-offset-3" style="padding-left:80px;padding-right:80px;" href="http://www.facebook.com/sharer/sharer.php?u=https://cyclingevents.my/payment/successful_payment/1200004/1" target="_blank"><i class="fa fa-facebook"></i> Share on Facebook</a>
Here is the error from facebook debugger
here is my website URL
https://cyclingevents.my/payment/successful_payment/1200004/1
Any idea how to solve my issue?
Thanks
The URL you provided is not accessible for non-logged in users, that's why the Facebook Scraper can't access is as well, and therefore not read the OG tags.
If I try to access it, your site redirects me to https://cyclingevents.my/login/sign_in

How to Moderate Facebook Comments in mediawki

I am using a widget Facebook Comment in my MediaWiki site.
The widget is showing facebook comment box properly and it is functioning good except that I can't moderate the comments.
The installation says:
You have to set fb:app_id open graph property too indicate to Facebook that you're the administrator of the site and can moderate comments and add section.
But I didn't understad this line. If someone know the way please post with some example.
Looks like you have not added an App Id, go to https://developers.facebook.com/tools/
Click on "Apps" pull down menu, Click "Create a New App" and create a new application with your website name, it will generate an Application Id, use that in your website meta tag as below:
<meta property="fb:app_id" content="<your App id>" />
And ofcourse other meta tags as well,
<meta property="fb:admins" content="<your admin id>" />
<meta property="og:image" content="<website logo image url>" />
<meta property="og:site_name" content="<Site name>" />
<meta property="og:url" content="<webpage completel url>" />
<meta property="og:title" content="<title>" />
After that you should be set!
I had the same problem. After hours, I found a solution... In facts there is very little errors in the code on the widget page...
In LocalSettings.php, copy-paste this (xxxxx = your FB IPapp number) and it will work:
$wgExtensionFunctions[] = 'mww_fb_app_id';
function mww_fb_app_id() {
global $wgOut;
$wgOut->addHeadItem ( "fb:app_id" , '<meta property="fb:app_id" content="xxxxx"/>');
}

How do I add metadata to wordpress so it's pulled when adding a Facebook link?

I have a wordpress site and I'm creating a facebook page to announce new articles added in the blog.
But I'm having two problems:
Whenever I add a link to the main site, I get a default text describing the site, probably from some automatic post. I've deleted the default post and the page that are created automatically with each wordpress installation, so I'm not sure where it's pulling this from, and I'd like to add my own text describing the blog: http://snag.gy/0AZaw.jpg
Notice that it's not pulling any thumbnail images from the site either. It's just a plain text link, very dull and boring.
Also, I have featured images for each one of my posts, but when I link to a specific post within facebook, I don't get an image thumbnail. I'd like to have the featured image to be pulled or either add a hidden image somehow, so it's pulled from Facebook but it's not displayed in the actual blogpost.
Thanks!
You're going to want to include Facebook Open Graphic tags to help Facebook out with the information that gets displayed. Here's the documentation from Facebook to explain their use of Open Graph:
https://developers.facebook.com/docs/opengraph/using-objects/#selfhosted-creating
If you're a theme developer, you can add these into your theme yourself by pasting something like this in your blog header.php file:
<meta property="og:title" content="<?php wp_title(); ?>"/>
<meta property="og:type" content="article"/>
<meta property="og:url" content="<?php echo get_bloginfo('url') . $_SERVER['REQUEST_URI']; ?>"/>
<meta property="og:image" content=""/>
<meta property="og:site_name" content="The Hired Guns"/>
<meta property="fb:admins" content=""/>
<meta property="og:description" content="<?php bloginfo('description'); ?>" />
That said, I highly recommend using an great plugin called SEO by Yoast for doing this for you:
https://wordpress.org/plugins/wordpress-seo/
This will allow you to fine tune the sharing image, description, etc for each page and post.

Facebook Like button

I build new web site. On every post in my web site I have facebook Like button.
When visitor click on like button post don't appear on his-user home page , only in his profile page.
Can someone tell me why post(like) don't appear on home page?
I use code generated from http://developers.facebook.com/docs/reference/plugins/like (iframe)
Thanks
I remember running into this problem several months ago. This solved the problem for me (then), but the situation may have changed by now. Just put the meta data in the head with the desired info. It may take a while for facebook to notice that you have changed anything.
<meta property="og:site_name" content="Lime" />
<meta property="og:title" content="Lime Title" />
<meta property="og:type" content="article" />
<meta property="og:description" content="With more and more Lime [...]" />
<meta property="og:image" content="" />
<meta property="og:url" content="http://example.com/" />
<!--meta property="fb:page_id" content="18807449704" /-->
Do you mean the news feed in the facebook user's home page?!
It's not used to show the user's actions, read this:
News Feed — the center column of your
home page — is a constantly updating
list of stories from people and Pages
that you follow on Facebook.