Share link via twitter not work - html

This is my implementation of tweet button
<a href="https://twitter.com/share?url=generated_url"
class="twitter-share-button"
data-text="Hi, you can see my presentation on this link">Tweet
</a>
There is something like list of presentations and every one has tweet button and itself generated url to share.
It working well, post tweet like I want - text and url. But, when I tweet via this button, link on twitter is unclickable. What is wrong?
EDIT:
unclickable - showed as plain text, example screenshot:

The code is correct, but the links with "localhost" are not clickable.
I had the same problem until I tested with a "live/public" link.
Your generated_url should not contain localhost, but http ://www . yoursite . com / data

I think this page on the twitter dev docs and this question can help a lot. For what i found there, it would be something like this:
<a href="https://twitter.com/share"
class="twitter-share-button"
data-lang="en"
data-url="http://this.url.com/foo/bar">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

Related

Using href to go to a show page with a specific id?

I'm trying to create a link on my page that goes to a page with the right id. The page where the link is is at: http://localhost:3000/quotes/9942/marketingScheduleShell. Once the link is clicked the page should redirect to http://localhost:3000/quotes/9942/.
Something along these lines is how I want this to work but when I try the code below it just takes me to the /quotes/ page.
<a href='http://localhost:3000/quotes/' + #quote.id>Show</a>
How can I use the id of the quote object I click on to go to the correct page for that object?
The only think you need is a link_to method
link_to('Show', quote_path(#quote))
Also reading some guides would save you a lot of time: http://guides.rubyonrails.org/

use a class instead of id in a link

Is it possible to make a link that would normally go to an id:
<a href="http://example.com/page#someid">
instead go to a class:
<a href="http://example.com/page.someclass">
Would the page scroll wildly up and down, trying to reach all the elements with that class, or would it just do nothing?
It would do nothing, except look for a file called "page.someclass" at the server and most probably yield a 404. Please refer to the URL spec because you're wildly confusing CSS selectors with the 'hash' part of the URL.
Why don't just try it?
JS FIDDLE DEMO
If you are using a class als anchor link, your browser tries to open it as url, like in the example named above index.content. Because he is not able to find it, you will receive an 404 not found or 403 forbidden error.

Facebook send message puts in wrong URL

We are trying to use either the facebook send social plugin, or the fb.ui send dialog. In both cases, we have found the link or href we pass to facebook only mostly works. There are 3 places a link is placed in the message and they are:
The title of the message
A link right below the title
an image to the left of the description
1 and 3 seem to respect the link parameter, but 2 is not. Here is an example of the code we are using:
FB.ui({
method: 'send',
name: 'Referral',
link: 'https://www.oursite.com/?refer=123',
picture: 'http://www.oursite.com/assets/images/logo.png',
name:'heres a name',
description:'description'
});
When this gets sent the link https://www.oursite.com/?refer=123 works for the name and the picture, but not the link output right below the name. Here is the code we're using for the social plugin which yields the same effect:
<div class="fb-send" data-href="https://www.oursite.com/?refer=123"></div>
This happens because Facebook doesn't use your link parameter: it uses the og:url meta of the page you want to share.
If you use the fb-send plugin, you can have a look to the data-ref attribute : it should do the job :)
You should also have a look here: https://developers.facebook.com/tools/debug to know what URL Facebook will use at the end.
Good luck

facebook like button won't "like"

So what's strange is that the like buttons on my site will only work IF the like button has already been liked in the past. If there are no current likes, such as on this page:
http://www.narutomeetsbleach.com/naruto-shippuden-219.html
Then you can click like all you want, but you won't actually like anything. Does anyone know what's wrong? I got my like HTML directly from facebook and it's the exact same as the like buttons that are working.
Thanks so much!
You can use the Facebook LINT tool. It actually checks you meta tags and will point you in some direction what your problem is. (Check link below.. I have added a ?v=1 to the html page to avoid facebook server error response)
http://developers.facebook.com/tools/lint/?url=http%3A%2F%2Fwww.narutomeetsbleach.com%2Fnaruto-shippuden-219.html%3Fv%3D1
Type in your url and check your page.
Try changing your code to the following (is there a reason why you are using the appId/fbAsyncInit methods?):
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.narutomeetsbleach.com/naruto-shippuden-219.html?v=2" send="false" layout="button_count" width="450" show_faces="false" font="tahoma"></fb:like>
AND / OR
Use this link to generate your LIKE BUTTON Code
http://developers.facebook.com/docs/reference/plugins/like/
Generated Like Button Code (Iframe) :
<iframe src="http://www.facebook.com/plugins/like.php?app_id=137084976372144&href=http%3A%2F%2Fwww.narutomeetsbleach.com%2Fnaruto-shippuden-219.html%3Fv%3D3&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
Found it out! I had to remove the og:type meta tag. Found someone else on google who had a similar problem, that's what he did and now it seems to be working fine for me after I re-linted the url. Facebook's giving me a "warning" because I have og:type missing, but now it's working, so I guess that's all that matters. Thanks for all the help!
reference: Facebook "Like" produces "There was an internal error when updating the Page."
The Facebook button and all it's code comes from them and it's within an iframe with source from their server... you'll have little control over how that works. As long as you got your App ID and such entered correctly... otherwise, you're at their mercy.
Yes, even though it's just a "Like" button, you still need an App ID (appid). More detailed info below...
See the accepted answer to this: "Do I need an appid for the XFBML version of the Facebook Like button?"
And quoting this page, http://developers.facebook.com/docs/guides/web/:
"The JavaScript SDK requires that you register your website with Facebook to get an App ID (or appId). The appId is a unique identifier for your site that ensures that we have the right level of security in place between the user and your website. The following example shows how to load the JavaScript SDK once you have your appId:"

How to use HTML to do a Skype call?

I tried to insert the following snippet in my script. By clicking the link it should do a call to a Skype account. I've been looking for hours now, but can't figure out why it doesn't work.
<pre><code><a href="callTo://USERNAME"><img src="http://goodies.skype.com/graphics/skypeme_btn_small_green.gif" border=0></a></code></pre>
Is it accepted in any way or do I miss something here?
Try "callto" (with no uppercase letters).
Link will initiate Skype to call my number!
<a href="skype:********?call">Link will initiate Skype
to call my Skype username!</a>
source: http://geek.michaelgrace.org/2010/03/create-html-link-that-starts-a-skype-call/
I have been fighting with the following link all day.
Start chat
The problem that I had was with the USERNAME part
Finally, I just solved it.
My name on Skype web page was name but the real name was name lastname. The link in my web page did make Skype to load in my Android phone but, Skype failed to find the account to wich I wanted to call (name lastname).
I tryed, and failed:
<a href="skype:name lastname?call">...
<a href="skype:name+lastname?call">...
<a href="skype:name%20lastname?call">...
<a href="skype:name-lastname?call">...
<a href="skype:name_lastname?call">...
<a href="skype:phonenumber?call">...
Then, the solution:
<a href="skype:live:emailnamewithoutdomain?call">...
I just hope u find it usefull.
And, do not forget that u have a plenty of commands to add after the ? in the url (add,call,chat,and so on).
Just for another option from their official website:
https://www.skype.com/en/developer/create-contactme-buttons
It's nice and easy to use, can be used both for chat or/and call.