2013-03-21 2 views
4

짹짹과 구글 + 버튼을 누르면 미리 정의 된 텍스트를 표시 할 수 있는지 궁금합니다. 페이스 북에서는 가능하지만 google + 버튼에 사용할 수있는 코드를 찾을 수 없습니다.공유 버튼에 기본 텍스트를 표시 하시겠습니까?

난 내 페이스 북 공유 버튼 (이미하고있다)에 대한있어 코드는 다음과 같습니다

<a title="send to Facebook" 
href="http://www.facebook.com/sharer.php?s=100&p[title]=EHBE Groningen&p[summary]=this is the text to share http://sharelink.com&p[url]=www.example.nl&p[images][0]=example_image" 
target="_blank"> 
<span> 
    <img width="14" height="14" src="'icons/fb.gif" alt="Facebook" /> Facebook 
</span> 
</a> 

내가 현재 내 트윗 버튼 (또는 작업)에 대해 가지고있는 코드는 다음과 같습니다

<a href="http://twitter.com/?status=text to tweet" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://twitter.com']);" target="_blank">Tweet over deze pagina</a> 

그래서 내 질문에 미리 정의 된 텍스트를 표시하는 것이 가능한 경우 Google + 버튼의 일종에 대한 페이지 또는 기사를 좋아하거나, 공유하거나 트윗 할 때 가능합니다.


편집 나는 당신이 실제로 버튼을 클릭하면 나타나는 텍스트를 변경할 수 있도록합니다. 버튼 자체는 괜찮습니다.

답변

1

https://developers.google.com/+/web/+1button/

읽고 해당 태그/코드를 추가합니다.

+0

내 질문에 대한 답변을 얻지 못했지만 실제로 버튼을 클릭 할 때 나타나는 텍스트를 변경할 수 있기를 원합니다. 버튼 자체는 괜찮습니다. –

2

나는 Snippet documentation을보고 수집 할 수있는 것부터 페이스 북과 트위터가 어떻게 제공하는지 알 수 없습니다. 당신이 할 수있는 일

은 이것이다 :

<!-- Update your html tag to include the itemscope and itemtype attributes. --> 
<html itemscope itemtype="http://schema.org/Article"> 

<!-- Add the following three tags inside head. --> 
<meta itemprop="name" content="my title"> 
<meta itemprop="description" content="a description"> 
<meta itemprop="image" content="http://my-url.com/logo.png"> 

나는 이것이 아마 당신의 내용이 AJAX를 통해로드 된 경우 통증이있을 것입니다 알고 있습니다. 이 경우 다음과 같이 할 수 있습니다.

<body itemscope itemtype="http://schema.org/Product"> 
    <h1 itemprop="name">my title</h1> 
    <img itemprop="image" src="http://my-url.com/logo.png" /> 
    <p itemprop="description">a description</p> 
</body> 
+0

메타 태그에 itemprops 대신 Open Graph 메타 태그를 사용할 수 있습니다. http://ogp.me/ –

+0

@BWRic 이것이 OP가 링크를 따른다면 Snippet 문서에 주어진 코드였습니다. ** Open Graph 프로토콜 **은 두 번째 권장 선택 사항이므로 권장합니다. – Prisoner

관련 문제