Am using share button on my website and the code is
<a href="http://www.facebook.com/sharer.php?u=<?php echo $pageUrl; ?>" title="Facebook share" ><img style="margin-right: 10px;" src="_images/facebook_share.png" alt="facebook share button"/></a>
and the $pageUrl is the current page url fetched from address bar using PHP
what i need i have to add app id for this share and that should display in my app insite
How to do this...
You can't, the sharer.php endpoint is old and doesn't support much of the current functionality of the API - look at the Like Button or Feed Dialog instead
Related
I have Facebook share button on my Wordpress site. I have the open graph call in my functions.php. The problem I'm having is when you press the share button below a single post you get the meta description of the site from header.php along with a random image posted to Facebook.
When you use twitter which I have linked to my Facebook page you all the meta info along with the correct image for that particular post the same with a Facebook linked Pinterest account.
I've used the Facebook developer tool scraped various post URL and the all came back with the correct meta info and image error free. Can anyone explain this issue to me.
I figured out what the issue was.
Posting solution in case anyone might come across the same problem.
add: <?php the_permalink(); ?> to the data-href= URL:
<div class="fb-share-button" data-href="<?php the_permalink(); ?>" data-layout="button"></div>
oppose to:
<div class="fb-share-button" data-href="YOUR SITE URL" data-layout="button"></div>
This will load all pertinent info into the Facebook Iframe for Facebook Posting.
I know the title is not worded properly but I do not know how best to summarize my issue.
I have a ShareThis button installed on my site and an older Facebook Share Button.
When I share any page on my site, both the ShareThis and the Facebook share pop-ups show a thumbnail version of the site's Home Page.
I want the thumbnail to show the current page being shared.
How do you make that happen? Is it even possible to do?
Social sharing sites like Facebook and LinkedIn tend to respect schema.org schemas. So I tend to slap SoftwareApplication on my body then use a hidden div, putting what I want shared in there. You could manually (or programmatically) take a snapshot of the page and include it in the schema div to have it display as the image.
Here's what it looks like from one of my sites:
<body itemscope itemtype="http://schema.org/SoftwareApplication">
<!-- SoftwareApplication information -->
<div style="display: none;">
<h1 itemprop="name">Dache - Distributed Caching For .NET Apps</h1>
<img itemprop="image" src="/images/logo.png" />
<p itemprop="description">Fast, scalable .NET distributed caching with meaningful performance metrics for your managers and a simple API for your development team.</p>
</div>
...
Facebook in particular uses their OpenGraph technology. Here's an article on configuring what appears when your site is shared on Facebook.
I want to use OAuth in my web apps. I open OAuth page in new window Safari. Can I return to web apps from auth page after authorization?
It's my code for redirect to OAuth page:
<a class="auth-link twitter" href="<?php echo (Yii::app()->request->baseUrl); ?>/mobile.html?service=twitter" rel="external" >
<img src="<?php echo (Yii::app()->request->baseUrl); >/img/mobile/soc_icon_tweet.png" id="social_logo" alt="image">
</a>
It's impossible?
Unfortunately that's not possible. You'll need a native app and then add a custom URL scheme like "oauth://your-url.com".
I cannot get the activity feed to show the updates on my FB page on my web page. The url is www.briggroseunder7s.co.uk
It is showing random info from facebook, Below is the code i am using.
<div class="fb-activity" data-site="www.facebook.com" data-action="like,comment" data-width="300" align="center" data-height="300" data-header="true" data-colorscheme="dark" data-font="tahoma" data-recommendations="true" ></div>
I am only an amateur and trying to get this working for my kids football site. Any help is much appreciated.
In your code example above, data-site="www.facebook.com" is incorrect. What you need there is your website's url where the activity is happening.
Anyone know of some trick I can use to get facebook to authenticate a user within a fancybox iFrame? ... when I use the following code facebook dosent present the user with a login box, rather it gives them a link to facebook which puts the user back in the parent window
<a id="aFbLogin" href="https://graph.facebook.com/oauth/authorize?client_id=XXX&redirect_uri=http://ahost.com/callback.aspx&scope=email" type="text/html"><img style="border-style: none"
src="/Images/fBookLogin.png" alt="FaceBook Login Button"
title="Login with FaceBook" id="btnFbLogin" height="36" width="67" /></a>
Then some JavaScript to add the click event handler ... the pop up works .. but Facebook seems to not like being in an Fancybox-iFrame
Facebook has various measures (using css and javascript) in place to ensure that it is never hosted in an iframe. I'm afraid you are limited to using the popup implementation provided with the javascript sdk.