facebookのシェアボタンを実装したいです。以下は公式ページからコピペしたものです。
html
1<div id="fb-root"></div> 2<script>(function(d, s, id) { 3 var js, fjs = d.getElementsByTagName(s)[0]; 4 if (d.getElementById(id)) return; 5 js = d.createElement(s); js.id = id; 6 js.src = "//connect.facebook.net/ja_JP/sdk.js#xfbml=1&version=v2.8"; 7 fjs.parentNode.insertBefore(js, fjs); 8}(document, 'script', 'facebook-jssdk'));</script> 9
html
1<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-layout="link" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&src=sdkpreparse">シェア</a></div>
これを
html
1<div id="fb-root"></div> 2<div class="fb-share-button" data-href="http://localhost:8888/wordpress/詳しい?id=<?php echo $rest->id; ?>" data-layout="button_count" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="http://localhost:8888/wordpress/詳しい?id=<?php echo $rest->id; ?>">シェア</a></div> 3
としたのですが、シェアすることができません。
ちなみに
html
1"http://localhost:8888/wordpress/詳しい?id=<?php echo $rest->id; ?>"
の?id=<?php echo $r->id; ?>はホットペーパーapiの店舗のidのことです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/19 13:28
退会済みユーザー
2016/11/19 13:31
2016/11/19 13:33
退会済みユーザー
2016/11/19 13:35 編集
2016/11/19 14:05
退会済みユーザー
2016/11/19 14:05
2016/11/19 14:06
2016/11/19 14:08
2016/11/19 14:10 編集
2016/11/19 14:11
退会済みユーザー
2016/11/19 14:12
2016/11/19 14:16
2016/11/20 00:36
2016/11/22 11:28
2016/11/22 14:31
退会済みユーザー
2016/11/22 14:35 編集
2016/11/22 14:35
2016/11/22 14:35
2016/11/22 14:35
退会済みユーザー
2016/11/22 20:01
退会済みユーザー
2016/11/22 20:05
退会済みユーザー
2016/11/22 20:16
退会済みユーザー
2016/11/22 20:23 編集
退会済みユーザー
2016/11/23 01:43
2016/11/23 03:41
退会済みユーザー
2016/11/23 03:46
2016/11/23 03:46
退会済みユーザー
2016/11/23 03:56