I want to add facebook like button on a page in my website, but have the URL go to a totally different page in my website. Is it possible to do this? - url

I want to add facebook like button on a page in my website, but have the URL go to a totally different page in my website that has more detail. Is it possible to do this?

Yes, you can add a "data-href" attribute to the fb-like div, like so:
<div class="fb-like" data-href="http://www.DOMAIN.com/PATH/TO/MORE/DETAILED/PAGE" data-send="true" data-width="450" data-show-faces="true"></div>
Documentation found here

Related

jquery mobile multi-page internal hyperlinking

This appears to be pretty basic but I can't figure it out.
Using a jqm multipage template, I'm trying to allow users to jump from a link one page (id='page1') directly to an image in another page (id='page2').
FIDDLE
It appears I am constrained, by html hyperlinking rules and jqm, to this:
<a href='#page2'>go to image on p2</a>
... which of course jumps the user to the top of page2.
But that's not what I want. I want the user to jump directly to the IMAGE, which is close to the bottom of page2, tagged like so:
<img id='image-id'>
But tagging the link with the image's id (not the page's id), i.e. tagging it like this
<a href='#image-id'>go to image on p2</a>
doesn't work.
I get the feeling I'm missing something very obvious, but can't figure it out.
Any suggestions? Or is this not possible?
I've got a different problem but found this question in my travels... thought I would add an extract from the jquery mobile page:
http://demos.jquerymobile.com/1.4.5/navigation-linking-pages/
Note: You cannot link to a multipage document with Ajax navigation active because the framework will only load the first page it finds, not the full set of internal pages. In these cases, you must link without Ajax (see next section) for a full page refresh to prevent potential hash collisions. There is currently a subpage plugin that makes it possible to load in multi-page documents.

Configuring Facebook's Page Like Button

I'd like to have a facebook like button, and I would like it to act like this:
When a user clicks on the button in the user's news feeds the following is shown:
- the name of my site
- link to my web site
- my web site logo
- short description
I am using ruby on rails 3.
Would you be so kind and help me configure this?
Thanks, D.
There are two steps on how to achieve this. First step is to use the appropriate OpenGraph Tags on your website. These are just additional tags in your HTML head. You can find examples on the Open Graph Webspage.
Second step is to embed the like button. You can configure the code on the Facebook Developer page. When a user clicks on the button, the OpenGraph tags are automatically parsed and the result is shown in the user's stream.
Configure your requirement in below page
You can get the required script for facebook like button, by giving inputs to the widget in the page
http://developers.facebook.com/docs/reference/plugins/like/

custom share image for fb, g+ and twitter using open graph

Is it possible to have a custom share image for Facebook, Google+ and Twitter?
I've already set up the open graph tags in the head of the document.
Thanks
UPDATE:
For Facebook:
<a href="http://www.facebook.com/share.php?u=url" target="_blank" ><img src="fb-img"/></a>
For Twitter:
<img src="twitter-img" />
Still looking for google+
By the way, any difference with sharer.php v/s share.php for Facebook?
I found the best solution to implement custom share button with Facebutton:
Go to facebook developers page and there you will have to read the following article which will explain you how to use meta tags (HTML) on the head of your page:
https://developers.facebook.com/docs/sharing/webmasters
Basically you need to add a Share Button on your page, right?. So, what you need to do is first of all, add the meta tags that page ask you for on the head of your page. Then everything is so easy. After facebook provides you with the code for the share button, now when you click on it, it will show you the image you specified on your meta tags. Take a look at that page and you'll see how easy is to implement it.
Twitter still i haven't implement it yet neither for google :(

Rails link to remote site in a partial pop-up

I want to render a link to an external site in a pop up from my site in Rails. What's the best way to go about doing that?
e.g. I want to have something like www.cnn.com show up in a pop-up partial when a link is clicked on my site.
You can't make cross domain ajax calls to show inside a popup. So it won't be so easy as rendering a link. You can try using a iframe inside that popup.

URL with JQuery Mobile

I am using JQuery mobile in asp.net web form website. I have the following code at the page "pageA.aspx".
View Saved Orders
When I am clicking on this link I am successfully redirected to the PageB, but the URL I am getting is
http://localhost:3244/MyFirstJQueryApp/PageA.aspx#PageB.aspx
But I want URL like this further processing, please help
http://localhost:3244/MyFirstJQueryApp/PageB.aspx
I have done it by setting target="_top" property.
Is this a good practice ?
There are a couple of mods out there (can't find the one I wanted) to remove the hash in the URL, but you have to edit the jQM framework.
You could try using the changePage() http://jquerymobile.com/demos/1.0a4.1/#docs/api/methods.html and set the transition without tracking it in history option to true (I think it's true)
Here is some more documentation on navigation as well: http://jquerymobile.com/demos/1.0a4.1/#docs/pages/docs-navmodel.html
mightbe able to think of another way
The idea behind jQuery Mobile is that you don't do it the way you're trying to do it! Check Dynamic pages with jQuery Mobile, which shows you how to let jQm do the work in the background by loading new data into the DOM.

Resources