Facebook曾经在Facebook共享按钮中允许自定义参数,但它现在不起作用.我需要的是创建一个Facebook共享按钮,它将具有自定义标题,网址,图像,描述等.使用元标记无法完成,因为单个页面上有多个共享按钮.每个应该有一个不同的标题,网址,图像等.我听说它可以使用Facebook应用程序 - 使用应用程序ID或其他东西.
我试过这个,但它不起作用:
<a title="send to Facebook"
href="http://www.facebook.com/sharer.php?s=100&p[title]=YOUR_TITLE&p[summary]=YOUR_SUMMARY&p[url]=YOUR_URL&p[images][0]=YOUR_IMAGE_TO_SHARE_OBJECT"
target="_blank">
Run Code Online (Sandbox Code Playgroud) 不能用西里尔语分享网址:http://????-??????????.??.我的网站facebook.com/sharer/sharer.php用来实现这一目标.http://xn----7sbbdcmja7ed0aci5rc.xn--p1ai/在此步骤中,url已经使用FB 转换为punycode().
单击时Share Link,将返回错误,并显示以下消息:Could not post to Wall. The message could not be posted to this Wall.
我还检查了网址在developers.facebook.com/tools/debug它返回以下错误:Error Linting URL: An internal error occurred while linting the URL(查看结果).
这是一个FB错误或我该如何解决这个问题?
我正在使用"sharrre"插件在我的某个网站上添加社交按钮.
该代码适用于facebook,twitter和google +.Pinterest和Linkedin按钮根本没有显示.有任何想法吗?
$('#twitter').sharrre({
share: { twitter: true },
url: 'voxita.com',
enableHover: false,
enableTracking: true,
template: '<a class="box" href="#"><div class="count" href="#">{total}</div><div class="share"><span></span>Tweet</div></a>',
buttons: { twitter: {via: 'romaeventi'}},
click: function(api, options){
api.simulateClick();
api.openPopup('twitter');
}
});
$('#facebook').sharrre({
share: { facebook: true },
url: 'voxita.com',
enableHover: false,
enableTracking: true,
template: '<a class="box" href="#"><div class="count" href="#">{total}</div><div class="share"><span></span>Like</div></a>',
click: function(api, options){
api.simulateClick();
api.openPopup('facebook');
}
});
$('#google').sharrre({
share: { googlePlus: true },
url: 'voxita.com',
template: '<a class="box" href="#"><div class="count" href="#">{total}</div><div class="share"><span></span>+1</div></a>',
enableHover: false,
enableTracking: true,
urlCurl: …Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个G + Share按钮,如果用户成功共享链接,则"oneinteinteraction"返回'confirm'.我尝试过没有成功.当我通过'onendinteraction'事件记录用户活动时,它会让我'悬停'并且永远不会返回'确认',即使用户正确地共享链接.
这是我创建的代码,它很简单:http: //codepen.io/anon/pen/DdjAo
<div class="g-plus" data-action="share" data-annotation="none" data-onendinteraction="googleEventShare" data-href="http://codepen.io/"></div>
<script type="text/javascript">
window.___gcfg = {lang: 'en'};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<script>
function googleEventShare(params) {
console.log(params.type);
}
</script>
Run Code Online (Sandbox Code Playgroud) AMP是否支持facebook,twiiter和google plus分享按钮?这里或github上没有关于这个问题的明确信息.
我有问题.我遵循了很多指南,但仍然无法让我的Share按钮工作.我在ActionBar中显示了图标,但是当我按下时没有任何事情发生在android:showAsAction ="always".但是当android:showAsAction ="never"时它会起作用.我只想让分享图标始终显示在ActionBar中.我做错了什么?请帮忙
这是我的代码:
public class Main extends Activity {
private ShareActionProvider mShareActionProvider;
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu, menu);
MenuItem item = menu.findItem(R.id.shareButton);
mShareActionProvider = (ShareActionProvider) item.getActionProvider();
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.shareButton:
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
String shareBody = "Check it out";
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,"Subject");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
startActivity(Intent.createChooser(sharingIntent, "Share via"));
return true;
case R.id.aboutButton:
Intent intent = new Intent(this, About.class);
startActivity(intent);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
} …Run Code Online (Sandbox Code Playgroud) 我正在尝试访问 iOS 的共享按钮,您可以在其中将内容共享到所有服务,包括消息等......知道我该怎么做吗?谢谢
share-button ×7
facebook ×2
amp-html ×1
android ×1
button ×1
google-plus ×1
ios ×1
javascript ×1
pinterest ×1
react-native ×1
share ×1