i am using google plus icon in my site using the following code
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
<g:plusone size="medium" href="https://plus.google.com/u/0/b/104806777345217966807/"></g:plusone>
but whenever i click that button it redirect me into wrong URL . How to i change this
> https://accounts.google.com/ServiceLogin?service=oz&continue=https://plusone.google.com/%2B1/profile/?type%3Dpo%26client%3D1%26gpsrc%3Dwidget%26parent%3Dhttps://plusone.google.com%26proxy%3DI2_1334919708352%26rsz%3D1%26hl%3Den_US%26gpsrc%3Dwidget&hl=en-US#724922462
If i use the below code it redirect me to given path but it show different view
Please guide me i already searched in all blog but i did not get solution for my issue
The purpose of the +1 button is for the viewer to plus 1, or recommend the linked site publicly on Google+
So the person has to be logged into G+ to be able to do it and thus the link redirects you to the google login page.
If I understand you correctly, you want an G+ image link to that page. In this case simply find and add a G+ icon image and enclose it within <a /> tag pointing to the link.
Related
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-59f4a28b67531349"></script>
This script redirect to the Instagram website. I don't want it to redirect to the website. Can anyone please solve the issue. User will follow instantly when user click the button.
Simply put: you can't.
Instagram doesn't allow you to instantly follow someone with the push of a button from a different source.
If they did allow that, it could be very easily abused I.E a script that clicks the button automatically.
I would like to put a button on my one page web application that allows a user to send a link through Gmail. I found that some websites such as addthis.com provide such a button, however this button automatically uses the link from the url bar. Since I have a one page web application the link in the url bar will always be the same. I need to be able to to put the link in the button myself (which is possible with, for example, the Facebook and Twitter share buttons).
How can I create a Gmail button that can be used to share a link?
Thank you.
On Button click write a function and do this inside the function
let url = 'https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=&su=Your+Subject+here&body='+msgbody+'&ui=2&tf=1&pli=1';
window.open(url, 'sharer', 'toolbar=0,status=0,width=648,height=395');
The url will generate a link to open a gmail tab with auto filled subject and in in place of msgbody you can put your url you want to share.
Gmail Sharable Link Creator
Site Link: GmailLink.GitHub.io
Steps to Follow to generate the Link
Get the Message ID Of Mail Thread (Mail > 3 dot menu in Right side (⋮) > Click on Show Original > See the MessageID).
Copy the Message-Id
Use the MessageId & click On Submit to generate the Mail Sharable Link.
Try the official Google+ Share button. There's a field there where you'll specify the "URL to share". Since you're only using one URL, this might work in your favor.
I want to add a link in my profile which will redirect the visitor to his/her profile when it will be clicked.
I came across a profile few week ago(tried to find account but no luck ) which has the same implementation like as written below
i always upvote (this user) ... etc where this user is a hyperlink which redirected me to my profile (seems cool to me).
Attempts Info
As we know , we can use html so it was easy to put a static link there like
Testing
but the implementation required the dynamic code which should appends the user id at the end of the link so i thought of Javascript but it can't be used directly , result in the same JS code to displayed on my profile along with script tags.
but then i wrote the whole HTML template as and no script tag shown in my profile
<!DOCTYPE HTML>
<html>
<head>
<script>
window.localStorage.getItem('username'); // appear as it is
</script>
</head>
<body>
Testing
</body>
</html>
but still , whatever i write inside script , displayed as it is on my profile screen, even i thought to get the username from cookies or browser but no luck
1.) How can get the visitor profile link and use it as href link ?
right now it looks like this and clicking on testing link, redirect visitor to users tab on SO site which is not desirable
i would really appreciate any help or direction . Thanks you
Note : you can try this in your profile too , just copy paste the code in your profile section , i am not really asking to visit my profile for views
I been trying since from two days and finally i just managed to do this by just making a small amendment to my code , no javascript required. Hurrraah!
All i needed to do was, add /current at the end of my URL's href link which will take the visitor to his/her profile when clicked.
so it should be like this
<a href="http://stackoverflow.com/users/current">
instead of this
<a href="http://stackoverflow.com/users">
small things do help !
I have generated my fb share button code using Like Button Configurator. The image and heading is showing correctly but the description showing is the meta description of my site. I need to show the first few lines of the page that I am sharing.
I have also tried with Feed Dialog method and try to pass the page content as description. but when I give sample text it is working but not working when I give the page content.
Also tried to set
<meta property="og:description" content="Your description" />
but it also not worked.
All I need is to show first few lines of the sharing page instead of meta description.
here is a sample page.
The meta tag og:description should work.
The issue is that Facebook cache the pages info and you need to clear the cache manually to see the changes.
Go to https://developers.facebook.com/tools/debug/ enter your URL and see how Facebook is seeing your page info also you can force FB to fetch your new changes using the "Fetch new scrape information" button.
I am trying to add a Pinterest button onto a product page for a single image in a Facebook Tab app.
The Pinterest code is grabbed from their goodies section, and must include a URL, the Media URL and the Description.
I am not that proficient with Javascript. I am trying to pull the URL and insert into the Javascript button for a single item. Please see below; Thanks.
Pin It
Since you trying to get Pinterest button working in Facebook Page tab this will not work due to inability to know which Page you're on in JavaScript.
This info is passed to server with signed_request. You have couple of options to do so:
Build the link to page that will be linked to "Pin" server-side
Pass information about Page and Page Tab to client side and build the link here.
Beware that this is just a link and it will not looks like Pin-It button until you including Pinterest JavaScript (//assets.pinterest.com/js/pinit.js) on a page. If you build that link in Client Side you must include that JavaScript after, so link will be replaced by iframe with actual Pin-It button.