Want to share a particular block or div from my entire page into facebook - facebook

I have a requirement that in a webpage I have multiple block of content which is wrapped inside individual DIV. Each block needs to have a share to facebook button.
Did many researches but couldn't find a solution. Please can anyone give me a suitable code or idea how I can share particular blocks/content wrapped inside a div into facebook.
For e.g.
I have three DIV in my page and each DIV has share button, when user clicks on any of the share button the respective DIV is shared.
Is there any solution to this requirement or whether is it possible to do. Any kind of suggestions are widely accepted.

Check out this HyperArts tutorial on adding a Share Button to an iFrame tab - you use the exact same code for your webpage. You will be using the Facebook JavaScript SDK.
At the end of the tutorial it explains how to modify it to allow for multiple Share buttons on one page. You just need to add a unique identifier for each one.

Related

Fancybox 2: Any way of opening iframe without showing it?

I am using Fancybox 2 for my web application. I read its online documenation, but failed to find a way of opening iframe without showing it to a user.
The reason for my inquiry is that when a regular page is loaded, I would like to make a Fancybox iframe get loaded too without a user's notice. When the user clicks on a link on the page that will trigger Fancybox to show the iframe, I would like to make it simply visible. I hope this would greatly improve user experience in terms of speed.
Any ideas or links would be really appreciated.
You could, for example, simply create hidden iframe element and display it as any other "inline" element using fancyBox.

How to link multiple pages in GWT

I am new to GWT and so my knowledge is restricted.
Right now I have created a simple Login page which will take my user to another page and then based on the choices that the user makes, it will direct it to the next page. I have created 3 individual pages but I have no clue how to link them. Can someone please help.
In GWT typically you do not create separate pages - you create separate "views". They may look like pages to an end user, but in reality the entire app works in a single HTML "host" page.
You may want to look at the Activities and Places design pattern. It takes care of navigation between different "places" within your app.
very simple example with a DeckPanel. It shows only the selected 'page' and hides the other ones
DeckPanel deckPanel = new DeckPanel();
deckPanel.add(page1);
deckPanel.add(page2);
deckPanel.add(page3);
deckPanel.showWidget(0);
//deckPanel.showWidget(1);
//deckPanel.showWidget(2);

Implementing Stocktwit Share in php loop?

I am working on a site and I require that stocktwit share button appears against each post which are running in loop. i tried integrating the share button from the stocktwit site. The first button is working fine, it fetches the data i m providing in the "data-text". But for the rest they simply open a share screen with no values fetched. Please suggest how I should use the share button in a loop?
If I understand this correctly you are trying to have multiple share buttons on one page. You can go about this 2 ways.
Using the share button coded as so should work:
<img src="https://stocktwits.com/assets/widget/stocktwits_share.png" alt="Share on StockTwits"/>
The issue you are seeing is because of the multiple button ID's. You can only have one per page.
The other option is to use our API and the message/share endpoint. This will give you more control. http://stocktwits.com/developers/docs/api#messages-create-docs

how to customize facebook like button

I am usign the version of based on the <fb:like > tag. This renders a small facbook logo which implements the actual "like" operation, but also includes a large "signup to see what your friends like", or the number of likes when you are logged in, etc. It is pretty clear from what I have read that this is the form facebook wants you to use, but it makes the button to wide for my layout. The point is that I see other versions on websites all over, in particular "the weather channel" has one that includes only the logo with some text such as "like us" next to it. "Chicago Tribune" has one that says "recomend" with a very small like count next to it. I have not been able to determine what these link to or what script they invoke so that I can copy them. Can anyone help ?
when you get the code of the like button from facebook you can play with the options and get different results: http://developers.facebook.com/docs/reference/plugins/like/.
obviously it's limited to how facebook wants it to look like.
it is possible to change the look with css, but that's not wise since it's against their policy and you'd have to keep track with their changes.

Multiple Facebook Like buttons (different activities) on one page?

My one web page uses Ajax to display information about multiple activities.
I'd like to have one Like button per activity. This would mean multiple Like buttons on the page, one per activity. Can this be done?
Can the Like button's url include #!state1 ?
Eg, a web page is located at www.example.com/index.html
It has multiple FB Like buttons on it, one for url www.example.com/index.html#!activity1
another for www.example.com/index.html#!activity2
Will the two Like buttons work independently?
You can have multiple like buttons on a single page, but each like button must be linked to a separate page.
Eg: if you have products, each listing could have a like button next to it, but that like button would link to the product details page.
If you really wanted to, create phantom pages on your site with some meta tags. Then on your index.html, use like buttons that link to those pages.
To ensure no one ever gets to your phantom page, include the tag:
<meta http-equiv="refresh" content="0;url=http://www.example.com/index.html/">
That way, if someone clicks on the link that comes up on a facebook wall, they'll be redirected to the correct page.