如点facebook分享时,分享的url能否自定义
用smarty整理需要的参数,source_user,和source是自己加的,方便跟踪是谁分享的<{assign var=title value="<{$lcoin}> <{$goods.price}> <{$goods.base_name}>"}><{assign var=title value=$title|escape:"url"}><{assign var=url value="http://<{$smarty.server.SERVER_NAME}><{$goods_url}>?source_user=<{$user_id}>&source=sns_share_"}><{assign var=facebook_url value=($url|cat:"facebook")|escape:"url"}><{assign var=twitter_url value=($url|cat:"twitter")|escape:"url"}><{assign var=pinterest_url value=($url|cat:"pinterest")|escape:"url"}><{assign var=google_url value=($url|cat:"google")|escape:"url"}><{assign var=image value="http://<{$smarty.server.SERVER_NAME}><{$goods.image|image:'0x0'}>"}><{assign var=image value=$image|escape:"url"}>
4个社区分享的url:https://www.facebook.com/sharer/sharer.php?u=<{$facebook_url}>&t=<{$title}>https://twitter.com/intent/tweet?original_referer=<{$twitter_url}>&text=<{$title}>&url=<{$twitter_url}>http://pinterest.com/pin/create/button/?url=<{$pinterest_url}>&media=<{$image}>&description=<{$title}>https://plus.google.com/share?url=<{$google_url}>
这个文章可以看看:https://segmentfault.com/a/1190000005081846
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
用smarty整理需要的参数,source_user,和source是自己加的,方便跟踪是谁分享的
<{assign var=title value="<{$lcoin}> <{$goods.price}> <{$goods.base_name}>"}>
<{assign var=title value=$title|escape:"url"}>
<{assign var=url value="http://<{$smarty.server.SERVER_NAME}><{$goods_url}>?source_user=<{$user_id}>&source=sns_share_"}>
<{assign var=facebook_url value=($url|cat:"facebook")|escape:"url"}>
<{assign var=twitter_url value=($url|cat:"twitter")|escape:"url"}>
<{assign var=pinterest_url value=($url|cat:"pinterest")|escape:"url"}>
<{assign var=google_url value=($url|cat:"google")|escape:"url"}>
<{assign var=image value="http://<{$smarty.server.SERVER_NAME}><{$goods.image|image:'0x0'}>"}>
<{assign var=image value=$image|escape:"url"}>
4个社区分享的url:
https://www.facebook.com/sharer/sharer.php?u=<{$facebook_url}>&t=<{$title}>
https://twitter.com/intent/tweet?original_referer=<{$twitter_url}>&text=<{$title}>&url=<{$twitter_url}>
http://pinterest.com/pin/create/button/?url=<{$pinterest_url}>&media=<{$image}>&description=<{$title}>
https://plus.google.com/share?url=<{$google_url}>
这个文章可以看看:https://segmentfault.com/a/1190000005081846