<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>たねっぱ！ &#187; ソーシャル</title>
	<atom:link href="https://taneppa.net/tag/%e3%82%bd%e3%83%bc%e3%82%b7%e3%83%a3%e3%83%ab/feed/" rel="self" type="application/rss+xml" />
	<link>https://taneppa.net</link>
	<description>コツコツあつめるWeb作りのためのたね　たねっぱ！Web系情報ブログ　Webのお役立ちネタ配信中！</description>
	<lastBuildDate>Tue, 09 May 2023 00:02:06 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>TwitterCardが表示されるようにして記事が拡散されやすくしよう！</title>
		<link>https://taneppa.net/tw_card/</link>
		<comments>https://taneppa.net/tw_card/#comments</comments>
		<pubDate>Sun, 04 Oct 2015 23:30:19 +0000</pubDate>
		<dc:creator>tanippa!</dc:creator>
				<category><![CDATA[Web制作]]></category>
		<category><![CDATA[ネタ]]></category>
		<category><![CDATA[ソーシャル]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=2810</guid>
		<description><![CDATA[今回は、記事がTwitter上で拡散されやすくするための機能であるTwitterCardを表示させるための方法をご紹介したいと思います。]]></description>
				<content:encoded><![CDATA[<p>広報や宣伝としてのSNSの役割が大きくなっている事はもはや周知の事実だと思います。WEBサイトにおいてもFacebookのogpメタタグなんかは実装しているサイトはかなり見かけます。ただTwitterCardに関しては体感的に実装しているサイトは少ない気がします。</p>
<p>折角ある機能を使わないのは勿体無いので、今回はTwitterCardを表示させるための方法をご紹介したいと思います。</p>
<h2 id="twittercard-">TwitterCardの表示方法</h2>
<h3 id="twittercard-">TwitterCardの見た目</h3>
<p>
  <a href="https://taneppa.net/wp-content/uploads/2015/09/img_tmp011.png"><img src="https://taneppa.net/wp-content/uploads/2015/09/img_tmp011.png" alt="img_tmp01" width="526" height="342" class="alignnone size-full wp-image-2811" /></a>
</p>
<p>Twitterカードは実装すると、上のような見た目でTwitter上で表示されます。上の例は「Summary」タイプのTwitterCardなのですが、Summaryタイプを含め現在4タイプの表示方法が存在しています。</p>
<table>
  <thead>
    <tr>
      <th style="text-align:left">タイプ</th>
      <th style="text-align:left">概要</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align:left">Summaryカード</td>
      <td style="text-align:left">標準的なタイプ</td>
    </tr>
    <tr>
      <td style="text-align:left">Summary(Large Image)カード</td>
      <td style="text-align:left">画像が大きいSummaryカード</td>
    </tr>
    <tr>
      <td style="text-align:left">Appカード</td>
      <td style="text-align:left">アプリのダウンロードリンクを表示できるカード</td>
    </tr>
    <tr>
      <td style="text-align:left">Playerカード</td>
      <td style="text-align:left">動画等をTwitter上で再生出来るカード（このカードを使っているサイトではVineが有名）</td>
    </tr>
  </tbody>
</table>
<p>過去にPhoto,Gallery,Productカードが存在していましたが、SummaryカードとSummary(Large Image)カードに統合され、現在では使用不可(deprecated)となっています。</p>
<p>今回はこの中で一番標準的なSummaryカードを例として、使い方を説明したいと思います。</p>
<h3 id="-">ソースコード</h3>
<p>HTMLソースのheadタグ内に、以下のmetaタグを記述する必要があります。</p>

<pre class="brush: xml; title: ; notranslate">&lt;meta name=&quot;twitter:card&quot; content=&quot;summary&quot; /&gt;
&lt;meta name=&quot;twitter:title&quot; content=&quot;(記事のタイトル)&quot; /&gt;
&lt;meta name=&quot;twitter:description&quot; content=&quot;(記事の説明)&quot; /&gt;
&lt;meta name=&quot;twitter:image&quot; content=&quot;[サムネイルURL(絶対パス)]&quot; /&gt;</pre>

<p>例えば、この記事のmetaタグは以下のようになっているはずです。</p>

<pre class="brush: xml; title: ; notranslate">&lt;meta name=&quot;twitter:card&quot; content=&quot;summary&quot; /&gt;
&lt;meta name=&quot;twitter:title&quot; content=&quot;TwitterCardが表示されるようにして記事が拡散されやすくしよう！  |  たねっぱ！&quot; /&gt;
&lt;meta name=&quot;twitter:description&quot; content=&quot;今回は、記事がTwitter上で拡散されやすくするための機能であるTwitterCardを表示させるための方法をご紹介したいと思います。&quot; /&gt;
&lt;meta name=&quot;twitter:image&quot; content=&quot;https://taneppa.net/wp-content/themes/taneppa/images/fb.jpg&quot; /&gt;</pre>

<p>画像を大きく表示するためにSummary(Large Image)を使用したい場合は、「twitter:card」の「content」を「summary_large_image」にすればOKです。</p>
<h3 id="-">表示のチェック</h3>
<p>metaタグを記述するだけではまだ不十分です。<a href="https://cards-dev.twitter.com/validator">Card validator</a>を利用して、記述や表示に問題がないか確認しましょう。問題なくカードが表示され、Logにエラーが出ていなければOKです。</p>
<p>
  <a href="https://taneppa.net/wp-content/uploads/2015/09/img_tmp021.png"><img src="https://taneppa.net/wp-content/uploads/2015/09/img_tmp021.png" alt="img_tmp02" width="1004" height="380" class="alignnone size-full wp-image-2812" /></a>
</p>
<p>確認が終われば、実際に呟いてみて表示を確認しましょう。</p>
<h2 id="-">以上</h2>
<p>以上がTwitter Cardの実装方法になります。TwitterCardに関してはやって悪くなることはないはずですので、積極的に導入していきましょう！</p>
<p>以上、たにっぱでした〜</p>]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/tw_card/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>「LINEで送る」ボタンを実装する方法</title>
		<link>https://taneppa.net/send-by-line/</link>
		<comments>https://taneppa.net/send-by-line/#comments</comments>
		<pubDate>Wed, 13 Mar 2013 07:30:09 +0000</pubDate>
		<dc:creator>katoppa!</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web制作]]></category>
		<category><![CDATA[アプリ]]></category>
		<category><![CDATA[コーディング]]></category>
		<category><![CDATA[ソーシャル]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=510</guid>
		<description><![CDATA[・ユーザ数が1億人を突破したLINE！
・「LINEで送る」、実装してみまSHOW！
・ここでちょっと注意！
の、3本立てでお送りします。]]></description>
				<content:encoded><![CDATA[<h2>ユーザ数が1億人を突破したLINE！</h2>
<p>どうも。katoppa!です。</p>
<p>LINEのユーザ数が1億人を突破したというニュースは耳に新しい話題ですね。<br />
<a href="http://japan.internet.com/busnews/20130121/3.html" target="_blank">「LINE」登録ユーザー数が世界1億人を突破、各種記念キャンペーンを開始 &#8211; インターネットコム</a><br />
<img src="https://taneppa.net/wp-content/uploads/2013/03/53ecbfdb.png" alt="53ecbfdb" width="730" height="540" class="alignnone size-full wp-image-545" /><br />
<span class="txtSmall">（※<a href="http://www.nhncorp.jp/press/2013/0118439" target="_blank">NHN Japan Corporation | 「LINE」、世界1億ユーザーを突破</a>より引用）</span></p>
<p>若年層への浸透率も高いLINEは、Web業界でも今や看過できない重要なソーシャルツールになっています。そんなLINEへURLやテキストを送ることができる「LINEで送る」ボタンが、公式にリリースされていますよ。<br />
<img src="https://taneppa.net/wp-content/uploads/2013/02/img_icon_design.png" alt="img_icon_design" width="780" height="240" class="size-full wp-image-518" /><br />
今回はそのボタンの実装方法をご紹介します。</p>
<h3>「LINEで送る」、実装してみまSHOW！</h3>
<p>まずは公式サイトのページへアクセス！<br />
<a href="http://media.line.naver.jp/howto/ja/" target="_blank">設置方法｜LINEで送るボタン</a><br /><div class="browser-shot"><a target="_blank" href="http://media.line.naver.jp/howto/ja/"><img src="http://s.wordpress.com/mshots/v1/http%3A%2F%2Fmedia.line.naver.jp%2Fhowto%2Fja%2F?w=600" alt="http://media.line.naver.jp/howto/ja/" width="600" class="alignnone" /></a></div></p>
<p>次に、幾つか生成するスクリプトの設定をしましょう。<br />
まずボタンのタイプを選択します。<br />
<a href="https://taneppa.net/wp-content/uploads/2013/02/line01.jpg"><img src="https://taneppa.net/wp-content/uploads/2013/02/line01.jpg" alt="line01" width="487" height="143" class="aligncenter size-full wp-image-536" /></a><br />
更に「送るテキスト」を設定。特定の文字列をLINEで送る場合は「直接入力」を、サイトのタイトルとURLをLINEで送る場合は「ページタイトルとURLを使う」を選択してください。（よくわかんないという人は、とりあえず「ページタイトルとURLを使う」を選んでやってみましょう！）<br />
<a href="https://taneppa.net/wp-content/uploads/2013/02/line02.jpg"><img src="https://taneppa.net/wp-content/uploads/2013/02/line02.jpg" alt="line02" width="780" height="143" class="aligncenter size-full wp-image-537" /></a><br />
最後に、プレビューを確認して、問題なければソースコードをコピーしましょう。<br />
<img src="https://taneppa.net/wp-content/uploads/2013/02/line03.jpg" alt="line03" width="748" height="214" class="alignnone size-full wp-image-535" /></p>
<p>あとは、HTMLファイルの「LINEで送る」を実装したい箇所に先ほどのソースコードをペーストするだけ。</p>
<h3>ここでちょっと注意！</h3>
<p>facebookのいいね！ボタンや、twitterのツイートボタンとは少し異なる点がありますので、お気をつけください。<br />
実は、「LINEで送る」というボタンは、現在スマートフォンのみで利用できるボタンです。PCサイトで実装しても、LINEで送ることができず、LINE公式サイトが表示されます。<br />
<a href="https://taneppa.net/wp-content/uploads/2013/03/line.gif"><img src="https://taneppa.net/wp-content/uploads/2013/03/line.gif" alt="line" width="638" height="83" class="alignnone size-full wp-image-552" /></a></p>
<p>PCサイトで表示してもユーザの混乱を招く結果になるかもしれませんので、「スマホで見た場合のみ表示する」など、工夫する必要がありそうです。</p>
<p>その他にも、文字列やURLは、エンコードをUTF-8にしておく必要があります。そうでない場合、文字化けしてしまうとのこと。</p>
<p>以上です！<br />
正しく使って楽しくユーザビリティを高めましょうー。</p>
]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/send-by-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
