I am trying to share a page of user on FB by giving the full url of that page. But it's not picking any title & other OG meta tags, which I have given on the page.
here is what I am using :-
<div class="img">
<a href='http://www.facebook.com/sharer.php?s=100&p[url]=https://pad.panda.org/content /nav_content.cfm?uNC=86290929&uXNavID=123906' target="_blank" onclick="javascript:window.open(this.href,
'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
<img src="images/facebook.jpg" alt="FaceBook" />
</a>
Try to get rid of all warning in the Facebook Debug Tool.
Related
I have Link to dynamic page as such:
<Link href={`/event/${event.slug}`}>
<a className="event-card">
<img
className="img-fluid"
alt={event.name}
src={event.event_main_image ? event.event_main_image : defaultEventImg}
></img>
</a>
</Link>
Problem arises when I go to this page through Link and click back and go to another similar dynamic page, there is no refresh of content.
Specificly there is a javascript webshop file that get's added to this page and when there is no refresh there is all sorts of buggy behaviour happening.
When I take Link element out and just use a tag like so:
<a href={`/event/${event.slug}` className="event-card">
<img
className="img-fluid"
alt={event.name}
src={event.event_main_image ? event.event_main_image : defaultEventImg}
></img>
</a>
then everything works, shop works, no buggy behaviour. Problem then is I cant run build with a tags as Nextjs compiler gives you error and tells you to replace a tags with Link.
So my question is how can I get a tag behaviour using Link component?
Is there a way to pull someone's profile picture from Twitter and display it on my site without Auth or Twitter API?
I think it was possible with API v1.1 but support for that has been stopped.
Any suggestions or advice?
There's the easy way, or the hard way :-)
The easy way is to use a service like http://avatars.io/
Simply call http://avatars.io/twitter/edent to get my avatar.
The hard way?
You can scrape it directly off the Twitter site. It's not pretty - but it works.
If you look at the source for my Twitter page - https://twitter.com/edent - you will see this block of HTML.
<a href="/settings/profile"
class="account-summary account-summary-small"
data-nav="edit_profile">
<div class="content">
<div class="account-group js-mini-current-user" data-user-id="14054507" data-screen-name="edent">
<img class="avatar size32" src="https://pbs.twimg.com/profile_images/417381475101593601/UUi48hOg_normal.jpeg" alt="" data-user-id="14054507">
<b class="fullname">Terence Eden</b>
<span class="screen-name hidden" dir="ltr">#edent</span>
<small class="metadata">
Edit profile
</small>
</div>
</div>
</a>
You can look for the first instance of <img class="avatar size32" and grab the src from that.
I want to share referral url from my site via Twitter/Facebook share buttons. I have customized share buttons.
I am able to share referral url on these two sites but because target=_blank, facebook's Share Link and Twitter's Tweet page appears on a new tab.
I want then in an iFrame so that user won't leave my website while sharing referral links.
Facebook Share Code
<a title="send to Facebook"
href="http://www.facebook.com/sharer.php?s=100&p[title]=YOUR_TITLE&p[summary]=YOUR_SUMMARY&p[url]=YOUR_URL&p[images][0]=YOUR_IMAGE_TO_SHARE_OBJECT"
target="_blank">
<span>
Twitter Share Code
<a href="#" id="shareWithTwitter" onclick="shareWithTwitter()">
<img class="social-share" src="<?php echo site_url('img/twitter.png'); ?>"/>
</a>
function shareWithTwitter()
{
var url = 'https://twitter.com/home?status=Join Fashion on '+$('#referal-URL').val();
$('#shareWithTwitter').attr('href',url);
}
All you have to do is adding a name attribute to the iframe and target your link to it.
<iframe name="iframeName" style="iframe style"></iframe>
link
open link in iframe
Is there some way to share some dynamic data from my page on facebook and twitter ?
I tried this code with static data and it worked, but I apply it dynamically it doesn't.
For Twitter:
<a href="http://twitter.com/share"
data-url="http://your.url.com/yourdynamicpage"
class="twitter-share-button"
data-text="What should I share?"
data-count="horizontal">Tweet</a>
For Facebook:
<img src="/path/to/your/image/" width="12" height="12" alt="alt" />
What am I doing wrong?
http://shantacreations.com/facebook_share_old/example_1/share.php/
yes the above link are functioning as you would like to make function.
I'm trying to figure out just how a particular function works on a Facebook page, and being no friend of JS syntax, am having trouble. Here's the question mark bit:
<a href="#" clicktoshowdialog="my_dialog" onclick="
(new Image()).src = '/ajax/ct.php?app_id=4949752878&action_type=3&post_form_id=3b933f46f9c4c44981e51b90c754bfce&position=2&' + Math.random();
FBML.clickToShowDialog("app4949752878_my_dialog");
return false;">
<img src="linktopicture" title="Are your friends fans?" width="190" height="230" />
</a>
<div style="display:none">
<div id="app4949752878_my_dialog" fbcontext="aa3fcff8e653">
<div class="app_content_4949752878" style="padding:10px">
<div with hidden then exposed content...
The functionality of this is an image that, when clicked, pops out the previously hidden div. I know that the app###### is prepended to all JS used in Facebook to limit its scope. I'm confused by the anchor parameter of
clicktoshowdialog="mydialog"
What is that identifying, and how is it targeting the div that's exposed when the image is clicked? Thanks for any clarification, and let me know if I can post any more sample code.
According to the wiki it's just for opening the dialog (which is defined at the bottom). Facebook generates the JS to open the dialog. The attribute got post-processed and the JS code (that you see in the onclick= attribute) was generated on it's basis.