Google plus: How to get feedback after sharing my content? - redirect

I am using share link for Google plus as follows:
<a href="https://plus.google.com/share?url={URL}"
onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
<img src="https://www.gstatic.com/images/icons/gplus-64.png" alt="Share on Google+"/></a>
After user clicks on the confirm button "Share", in google popup window, my website has no feedback whether user really shared content or canceled sharing (he clicked on cancel button).
Is it possible to get feedback from popup window?
The another option, how to use share link is without poopup window:
https://plus.google.com/share?url=YOUR_URL_HERE
But my website cannot get feedback from this way, either. Although the google plus form redirects user back to my website, it doesn't send any information nor in POST nor in GET array.

You should use the Web Share Button as described in the documentation here. If you use this method, you can add the optional data-onendinteraction tag to the HTML to trigger a JavaScript callback, which you can use to track success / failure of the share.

Related

specific fb page will not work with like button

I've had this like button/box setup for this specific page for some time. But now it;s stopped working:
Using code generated (for iframe) on this page:
http://developers.facebook.com/docs/reference/plugins/like/
to display this fb page:
http://www.facebook.com/JohnPurkiss
does not display/work. If I amend the like button url in the iframe to another fb page, it does work. I'm not tryinig to use a button/plugin that requires an app. Just a plain 'ol simple button. But it appears to me there is an issue with this specific fb page (johnpurkiss one above)
Any advice/help greatly appreciated.
The problem here is that the "page" you linked to is in actual fact a personal user.
You can not "like" a user in the same way that
you can not add a page as a friend...
or "poke" an event...
or subscribe to a photo...
You'll gave to provide an actual page to be liked.
As you can see from the screenshot below taken from the link you provided, there is no like button to be found.
Only an "Add Friend" and "Subscribe" button. I'm not sure if converting your profile into a page is the way you want to go, but it is possible. You can learn how at this link.

Facebook share button issue

I added the facebook share button within an email body (.htm). The purpose of the button is to share the photo a user received in his email. When the button is clicked, a new tab opens with the "Write a message" area to share on facebook.
The problem is that once "Share Link" button is clicked nothing happens - no confirmation, no redirect, BUT the link is actually posted on Facebook (so the end user would not know the message has been shared unless they check their Facebook while all confused). Here is the code for the button:
<a title="Share this photo"
href="http://www.facebook.com/sharer.php?
s=100
&p[url]=%PHOTO_LINK%.jpg (dynamically populated link)
&p[title]=Check out my pic!"
target="_blank">
<img src="someplace.png"
alt="Share on Facebook" height="50" width="50" />
</a>
I have tried using meta tags (title/description/url and the main namespace tag), but they are not picked up when shared (title/description is a bunch of random characters). Is this behaviour normal for share buttons of this sort, is it a bug or am I doing something wrong?
Thanks in advance
To fix this, put target="_blank" in the <a> tag.
You won't be able to share a photo within an email as it would mean sharing the URL to the email itself (which users won't have access to).
Instead, you should put the image on a website and use OpenGraph markup to give it a correct title, description, and thumbnail image. And then share the URL to this image on Facebook. You can still embed the image in the email, but the sharing and image need to be external from the email.
A lot has happened since 2012. There are now two API's a user may choose from when sharing on Facebook: 1) Sharer, and 2) Share Dialog.
Sharer: This will require confirmation of the user posting their content, and this will then get you what you want. However, Sharer only supports the url parameter now. There is basically no way to share any other parameter. Official Facebook Developer Docs: Share Button. And: Official Facebook Discontinuation of Sharer Non-URL Args Post.
Share Dialog: You will need to configure an App with Facebook, authenticate, and then to solve your problem, you'll want to set one of these params...
display : Set this to page (the default), or one of the other options, to determine how your share dialog displays.
redirect_uri : If you don't like how Facebook decides to interpret your display params, you can just redirect after sharing to some page on your site that says, "Post successfully shared! link to post" or some such.
Hope this helps someone.

How to return after Facebook share on a our site and close the pop up?

I have a one site , there I want to place a Facebook share button after the sharing the url or link return back on the site and show the coupon instead of share button.
We are waiting for the answers.
If any one give the right answer or make the script , I will give the some bouns.
From the Facebook official documentation:
http://developers.facebook.com/docs/share/
The Share button has been deprecated in favor of the Like button, and
will no longer be supported. Please use the Like button whenever
possible to drive maximum traffic to your apps.
I don't know specifically how to redirect to your site, however I suggest you to switch to like button in any case
I'm no lawyer, but it appears that forcing a person to share something is not correct
https://www.facebook.com/promotions_guidelines.php
You must not
condition registration or entry upon the user taking any action using
any Facebook features or functionality other than liking a Page,
checking in to a Place, or connecting to your app. For example, you
must not condition registration or entry upon the user liking a Wall
post, or commenting or uploading a photo on a Wall.
You should have your corporate attorney take a look at this before proceeding further with forcing a share.
Like is easy to do and is explicitly permissible. See:
http://developers.facebook.com/docs/reference/plugins/like/
Facebook's sharer.php is no longer deprecated but I suggest you switch to using dialog/feed to steer folks back to your coupon.
<a id='fb-share' style='text-decoration:none;' type='icon_link' onClick="window.open('https://www.facebook.com/dialog/feed?display=popup&app_id=YOUR_APP_ID&link=THE_PAGE_WITH_THE_SHARE_BUTTON?&description=MY_AWESOMENESS&redirect_uri=THE_PAGE_WITH_THE_COUPON&picture=URL_OF_A_PRETTY_IMAGE', 'mywindow', 'toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=580,height=325');
return false;" href="javascript: void(0)">Share on Facebook</a>";
I can not find a TOS violation for offering coupons to those that like or share.

using facebook share link with sharepoint

I have added a facebook share link to my sharepoint site using:
<a name="fb_share"></a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
type="text/javascript">
</script>
I have added the script to the masterpage and the link to the page layout. I all works fine apart from that when a new page is created using the masterpage with the script some of the editong tools are disabled. For example the Format and Markup Style Menus are disabled. Can this be problem be solved?
You might want to take a look at this link :
https://developers.facebook.com/docs/plugins/
It contains all the official Facebook plugins that you can embed into your site. In your case you should look in specific at the Send Button.
The Send Button allows users to easily send content to their friends.
People will have the option to send your URL in a message to their
Facebook friends, to the group wall of one of their Facebook groups,
and as an email to any email address. While the Like Button allows
users to share content with all of their friends, the Send Button
allows them to send a private message to just a few friends.
The message will include a link to the URL specified in the send
button, along with a title, image, and short description of the link.
You can specify what is shown for the title, image, and description by
using Open Graph meta tags.
It is very easy to implement these plugins - usually a case of "copy-and-paste". It looks to me that you have been using an outdated method of the Facebook share feature.

Facebook: any way to monitor when user clicks on Like button?

writing my first facebook webapp and i have some questions. I'm using their new Graph API + JS library.
The idea is that in order to use my webapp, user has to 'Like' facebook page A.
Suppose user is logged in. I have to check if he 'likes' page A. If user doesn't like that page, i display 'fan box' via
FB.XFBML.parse('<fb:fan profile_id="A's id" stream="0" connections="0" width="450"></fb:fan>');
Now, this fan box with 'Like' button is rendered in iframe that has src set to facebook domain.
Problem: i want to know when user clicks on 'Like' button so that i can display the rest of my webapp. The only possible solution that i can think of is polling every second facebook graph server which is really bad.
i can't attach 'onClick' event on that button cause it's inside iframe pointed to facebook domain (can't access it at all using JS)
i tried getting the contents of this iframe from my server and display it in iframe with empty src property so that i can access its elements - doesn't work, fan box is messed up.
There is no way that i know of to send 'i want to like that page' request to Graph server on behalf of the user.
I'm stumped. I really doubt that polling is the right way to solve this problem :)
You can get the onclick event by using the fbml code of like button instead of iframe code.
Facebook provides FB.event.subscribe which triggers when somebody clicks like button.
A complete tutorial is here.In your case you can write the code to refresh the page on like button click. and check for like condition on page load. so that if current user has liked the page you can redirect him to application page.