Previously Facebook allowed to share anything you want, now we should use feed and send dialogs. When we are using dialogs to share link to friend, then link should be validated though Facebook (as I remember even without sub domains).
Is there a way to add parameter to link like ?ref_id=any_unique_value or other ways, later sever to determine, with whom the link belongs to (and whom to reward).
You should be able to add a query string (?ref_id=abcd) to the link parameter of a FB.ui "send".
The FB.ui can be a bit finicky with what links it accepts. Please see my answer here for more info on valid links.
Related
I want to add a feature on my Drupal site its as follow hope someone can help.
I have a field called link which contains the link to download stuff and it is visible to all.
I want visitor to 1st like us on Facebook and only then the link should be available to see.
I am using Drupsl for Facebook module
Like-Buttons are restricted by fb. To realize your project you have to start a request on graph.facebook if the user is likinig your... whatever.
I am trying to implement multiple Facebook share buttons in one page to share different pieces of content.
I was looking at this page:
https://developers.facebook.com/docs/reference/dialogs/feed/
And tried to implement the Direct URL exactly as listed in the example:
https://www.facebook.com/dialog/feed?
app_id=123050457758183&
link=https://developers.facebook.com/docs/reference/dialogs/&
picture=http://fbrell.com/f8.jpg&
name=Facebook%20Dialogs&
caption=Reference%20Documentation&
description=Using%20Dialogs%20to%20interact%20with%20users.&
redirect_uri=http://www.example.com/response
However, if you click on the link above and click share, you get an error message. How can I prevent the error message from happening and actually post the story to the feed when clicked shared?
Am I supposed to activate something else on my page? I want to make sure I can share different pieces of contents.
Any insight would be GREATLY appreciated :D.
To make the example work with your values you will need to set up a facebook application with the https://developers.facebook.com/apps page.
It's important to set the domain and the site url of the application at the basic settings page since facebook validates the redirect_uri paremter of the feed dialog against those.
Armed with the application's id, you can change the example's app_id and redirect_uri parameters and it should work.
Edit:
Since you are trying to use these on a facebook tab, take a look into facebooks javascript sdk. The FB.ui method makes these sharing interface more pleasant to use.
I need to create a "contest" page where user will be asked to submit picture.
After that, they should be able to share their picture on FB, Twitter, G+, Pinterest, etc for other people to come and vote.
I want the page to be displayed as a jQuery gallery and whenever people select a thumbnail, the bigger picture open with the associated vote and "share" button.
When a user share an image, I want a specific TITLE & URL associated with that particular image... something like "http://www.mysite.com/contest.html#picture1"... or "http://www.mysite.com/contest.html#picture2"
How is this possible if I only have one page?
I wouldn't have problem if I could use the old "facebook.com/sharer.php" with parameters... but it seems that the Open Graph Protocol is "overiding" the sharer.php parameters....
Works fine with Twitter and Pinterest... I might have the same problem with Google+.
Excuse my bad english, thanks!
Well, set up a (“dummy”) page for each picture, and fill it with the appropriate OG tags … and have your users like that. And then put a JS redirect into that page, so that users following the link when it’s shared on Facebook will get to the “real” address you want them to end up at.
(Btw., IMHO this is what happens too often these days when people think doing everything client-side and client-side only is so “fancy” and that a “good” and “modern” site requires all that AJAX/one-page-only nonsense instead of a real good and working URL structure, and then are not able to handle all that this implies properly …)
The company I'm currently working for wants to create a button that lets people share their order on Facebook after they've paid, but with the deprecation of the "Share" button I don't really know how to do it.
The "Like" button does not seem fit for this. Any ideas, anyone?
There are a few ways to go about this.
You can use the standard sharer. This is good for one-off sharing or in cases where you don't have control or don't want to control how the share is rendered and you want Facebook to handle it.
http://www.facebook.com/sharer.php?u=<url to share>&t=<title of content>
It won't require you to have an app ID but you also won't get a nice control panel for your applications sharing history/insights. You can query and get some information about the URL your sharing though by looking through the open graph.
I.E
https://graph.facebook.com/?ids=http%3A%2F%2Fwww.cnn.com
https://graph.facebook.com/comments/?ids=http%3A%2F%2Fwww.cnn.com
You can set the URL and Title of the content. The sharer will then look at the metadata on the webpage your sharing to determine the contents of the share. More below.
You can also use the Feed dialog. Which comes with more customization options. The Feed dialog is the best option if your integrating sharing as an integral part of the application. I think at minimum you need to include the app_id,redirect_uri and link property. Look through the properties here. You will need an app ID to use this feed dialog and if your using the JS api you need to authenticate the user too. You can also invoke the dialog directly through a direct url where you don't need to pre-authenticate the user.
With either sharing method, you may wish to include custom open graph metatags on your webpage. This way you can influence how the Facebook scraper makes your share. You can set some default (pre-accepted by Facebook) open graph metatags on your page. Or you can create your own set now in the dashboard. In the Open Graph dashboard on Facebook you can customize how Facebook is supposed to read and interact with your metatags.
You can debug your pages open graph metatags by passing your URL through the debugger.
I.E
http://developers.facebook.com/tools/debug/og/object?q=www.cnn.com
This will give you, for example, JSON or an HTML representation of how FB sees the page.
It looks like they do virtually the same thing for simple posts. Do they show up in different place in Facebook? Any ideas?
Using FB.Connect.streamPublish you are allowed to specify attachments (image, flash, mp3), action_links, and a user_message_prompt. The posting to their Profile may be more engaging if you go this route.
The FB.Connect.showShareDialog is mainly just a url that you pass in. Facebook loads that url to get the page title, and see if there are suitable thumbnail images specified on that page.
The main advantage of showShareDialog is that you can ask the users to click on "Send as Message instead" to send the link to specific friends. The default behavior is to "Post to Profile instead".
For basic uses, the two calls can be very similar, but they each have their own distinct capabilities too. I'm finding that I have a need for both in different cases.