「四角いボタンに保存」を作成しようとしましたが、多分スクリプトに問題があります。Foursquare保存ボタンが会場のデータを読み取っていない
私は、サイトの会場のためのウェブサイトから、それは動作しますが、このコードを試してみました:
<div class="locInfo vcard" style="display: none;">
<h4>
<a class="fn" href="">Flying Star Cafe - Menaul</a>
</h4>
<p class="adr">
<span class="street-address">8001 Menaul Blvd NE</span> <br> <span
class="locality">Albuquerque</span>, <span class="region">NM</span>
<span class="postal-code">87110-4607</span>
</p>
</div>
<a href="https://foursquare.com/intent/venue.html"
class="fourSq-widget">Save to foursquare</a>
<br />
<!-- Place this script somewhere after the anchor tag above. If you have multiple buttons, only include the script once. -->
<script type='text/javascript'>
(function() {
window.___fourSq = {
"uid" : "5166539"
};
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = 'http://platform.foursquare.com/js/widgets.js';
s.async = true;
var ph = document.getElementsByTagName('script')[0];
ph.parentNode.insertBefore(s, ph);
})();
</script>
をそれは素晴らしい作品が、私はこの会場に同じ構造を使用している場合:https://pt.foursquare.com/v/centro-drag%C3%A3o-do-mar-de-arte-e-cultura/4be5f4802468c92887d30043
何かがうまくいきません...
<div class="locInfo vcard" style="display: none;">
<h4>
<a class="fn" href="">Centro Dragão do Mar de Arte e Cultura</a>
</h4>
<p class="adr">
<span class="street-address">Rua Dragão do Mar, 81</span> <br> <span
class="locality">Fortaleza</span>, <span class="region">CE</span> <span class="postal-code">60060-390</span>
</p>
</div>
<a href="https://foursquare.com/intent/venue.html"
class="fourSq-widget">Save to foursquare</a>
<br />
<!-- Place this script somewhere after the anchor tag above. If you have multiple buttons, only include the script once. -->
<script type='text/javascript'>
(function() {
window.___fourSq = {
"uid" : "5166539"
};
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = 'http://platform.foursquare.com/js/widgets.js';
s.async = true;
var ph = document.getElementsByTagName('script')[0];
ph.parentNode.insertBefore(s, ph);
})();
</script>
手がかりはありますか? 会場の場所が米国外にあることが問題であるかどうかわかりません...会場に使用する必要がある追加のパラメータはありますか?
は、私はGoogle Chromeの18.0.1025.162を使用して、正しい会場を決定するためにApache Tomcatの7.0.27
2番目のスニペットを試してみると、何がうまくいかないのか少し具体的になりますか?ボタンは機能しますが、会場を見つけることができませんか? これらのHTMLスニペットを使用している実際のウェブページをお持ちの場合は、リンクしておくと便利です。 – smehmood
確かに:会場の場所を示すウィンドウが開きますが、会場は認識されません。塗りつぶす空のフォームが表示されます。 –
ここに@smehmood、Foursquareのドキュメント:[リンク](https://pt.foursquare.com/business/brands/offerings/savetofoursquare) –