Social sharing with custom text, url and image - php

My requirement is to share a URL/page that is accessible only after the login!! sounds weird and meaningless but that's the requirement!! The problem is I can not use Open graph because facebook, twitter, and other social media who use Open graph will always take the title, text, and image of the login page from the meta information. So I searched and googled to get a way around to share the private URL with custom text, image, and URL. I have created some POC and have followed some plugins but nothing is helping me out.
I followed this article of "Share this":- https://www.sharethis.com/support/legacy/how-to-customize-which-url-text-and-img-to-share/ ( need to change button js to https://ws.sharethis.com/button/buttons.js )
This option is working fine for email sharing but social media is fetching the Login page meta always.
I followed this article for "Add this":- https://www.addthis.com/academy/setting-the-url-title-to-share/ (this seems to be old and they don't specify the date of the article!! )
This option is also not working and does not solve what is required.
So my question is it possible to share the page with custom title, image or description that is not accessible without login ?? if yes then any idea how to achieve this without Meta, Open graph, schema.org etc.

You tried to use OpenGraph tags on pages which require login. Facebook, Twitter and etc cannot access through obviously. Try to somehow recognize social media that request your protected content and give it to them.

Related

Google plus shares wrong title from post

If you try sharing via Google+ most of the articles on this WordPress site: appgo2market.com
you'll noticed that title when Google+ is wrong when trying to share.
This happens also if you cut and paste link to a post on your personal Google+ account for sharing.
I didn't see yet, any relation to what may need to be done on a WordPress site to solve this.
Any idea what needs to be done, on a WordPress site, using thesis2, to solve this?
Looks like many of the pages are behind a "become a member" section, which is the title I see being picked up. The title for the share can be controlled by adding schema.org markup, or by changing the title tag of the page. Take a look at this page for more details: https://developers.google.com/+/web/snippet/

How does the Facebook 'share' button on Stack overflow work?

I am looking to add social icons to our site, giving customers the ability to "like", tweet and share content on their facebook and twitter profiles. I have noticed to the left of this box, the facebook and twitter icons do exactly what I am trying to accomplish but I am not familiar with how to do this. Looking at the source code, there are JS references to:
<script type="text/javascript">
StackExchange.ready(function() {
var shareUrl = "http%3a%2f%2fstackoverflow.com%2fq%2f7505636%2f337690";
var shareMsg = "Advice+integrating+Facebook+%27share%27+and+link%2fimage+capabilities+with+our+site";
StackExchange.share.facebook($("#fb-share-7505636"), shareUrl, shareMsg);
StackExchange.share.twitter($("#twitter-share-7505636"), shareUrl, shareMsg);
});
</script>
Our site works this way: While anybody can visit the primary site at any time, individuals can sign up as representatives with their own unique URL that acts as a referrer to give 'credit' on rewards. I have reviewed the facebook developer site and to be honest I am slightly overwhelmed. I want to give our members the ability to click a Facebook icon from within their dashboard, prompting them to post on their wall with a set image, set title, and description. I have read in the documentation this is done by setting meta tags in the head but it does not seem to matter for my site (or I am clearly doing it wrong).
What if the URL facebook is looking for (share URL) is behind a password protected page or an area of the site which would not allow content based on a missing PHP SESSION variable?
Edit
I have also seen a lot on the net which says I have to integrate the Facebook JS SDK but then goes on to talk about authentication/permission to write on walls, etc. Yes the link to the left does not ask for permission to do anything other than to 1) log into the FB account, 2) post on the user's wall.
This site is a perfect example
The link above is great but it assumes I need to authorize a 'share' which does not occur on this site.
When you click on the share button, you call a script on facebook.com that will then in turn access the page pointed to in the querystring (?u=xxxxxx).
Facebook will parse that page and grab the first few images it finds, a description and title from the page. That is what it shows to you and allows you to add some additional text (as well as edit the title/description/and choose different images).
If that page contains the specific meta tags that facebook asks you to add to the page, then they'll use those to populate the title/description/image. This allows the webpage author to control how their page shows up in a facebook feed (although the user could still edit it before posting). These meta tags would need to be in that particular page to be used by facebook.
If facebook cannot access the page because it's password protected, etc. - then it cannot parse the meta tags and will then just show the user the URL as the title with no description and thumbnail.

custom facebook fan page

I want a facebook fan page with something like this:
With new design/theme, matching to my new website (orange/black)
Custom Logo/contents display
30 boxes short description, on mouse hover, get some highlight for box and on click of specific box, opens a new pop-up
pop-up should contain more detailed description and a link to specific page on my website
I think above things are achievable using FBML but any good ref/guide would be appreciated to help me quickly develop such a thing.
FBML is being deprecated by Facebook. You can create an iframe application instead. In an iframe you can basiclly do anything you like. As for themeing the page, you can't touch the facebook design. You can only control the contents of the iframe itself. You can however upload an image for the "profile picture".
Here is a guide for iframe apps for your reference:
http://www.hyperarts.com/blog/adding-iframe-application-to-facebook-fan-page/
Here is the reference site where you find the full demonstration of custom FB fan page.
You can achieve that using fb api.
http://www.kimwoodbridge.com/how-to-create-a-custom-facebook-fan-page/
http://blog.theunical.com/facebook-integration/simple-steps-to-publish-on-facebook-fan-page-using-php/
http://www.webdigi.co.uk/blog/2010/creating-a-custom-facebook-page/

Facebook share button for website

i need to use share button in my website. Different share button for different products.. mostly we need to use like this,
http://www.facebook.com/sharer.php?
In the above url what are all the parameters we need to pass for showing it as our website, product and some image of that product in that share page...
You asked what parameters you need to pass it to have it show up as your site, etc. The like button uses its own Graph Protocol API to do this, it essentially makes your page a facebook page and can be read as such. It's written like XML and defines things such as the thumbnail you want to show as your picture, the shortname of the site, etc. Go to developers.facebook.com to read all about the facebook API and app development and integrating into your webpage, etc.
you cand use this on github to share content on social media (includes facebook) and make your custom button!
You can use Facebook Like also. It performs the same as the Facebook share now appearing in your Facebook newsfeed with thumbnail, or
You can use some plugins like add this or you can use the following link:
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>

Share on Facebook shows incorrect image link

I am using Share on Facebook button with www.facebook.com/sharer.php?etc URI. However, I have some problems. Here's what I want to do.
My site is kind of like a blog in which each blog has a lot of photos
So when people click on Share on Facebook button, I want the users to be able to choose which photo to use as Facebook thumbnail. I'm aware this is the default method of Facebook Share which is to scan the whole page for images.
However, my problem is the thumbnails won't show. I viewed the source to find that the URI to the images is incorrect. For example :
**SHOULD BE :** http://www.mysite.com/web/images/photo.jpg
**ACTUAL :** http://www.mysite.com/images/photo.jpg
So in short, facebook fails to read the "web" in the URI. That's why the thumbnail won't show. Any idea how to fix this?
The link to the site :
http://www.biiiz.com/nya/blog.php?id=1
It's actually just a temporary hosting. 'm sure the share on FB will work fine when I move the files into their own hosting, but I'm just curious about this.
You can get facebook to clear their cache and re-download your meta data by entering your URL into their linter:
http://developers.facebook.com/tools/lint/
Consider the documentation
`<link rel="image_src" href="thumbnail_image" / >`
FB caches for... like... ever. You can't clear it manually, so just wait until their private crawler hits your site again.

Categories