我需要在"字体真棒"中添加带按钮的facebook。对于每个帖子的侧边栏,如下所示:
尝试了这个选项https://developers.facebook.com/docs/plugins/like-button,但它似乎不合时尚。
我需要像
这样的东西 package {
import Fighter;
import Rogue;
import Mage;
import Healer;
import MonsterOne;
import MonsterTwo;
import MonsterThree;
import MonsterFour;
import turn;
import flash.display.MovieClip;
import flash.events.TimerEvent;
import flash.utils.Timer;
public class CounterCode extends MovieClip {
public static var fighterCount:int = 0;
public static var rogueCount:int = 0;
public static var mageCount:int = 0;
public static var healerCount:int = 0;
public static var fullCount:Number = 100;
public static var monsCount:Number = 0;
public static var whoTurn = String(whoTurn);
public static var turnFighter:MovieClip = turnFighter as MovieClip;
public static var turnRogue:MovieClip = turnRogue as MovieClip;
public static var turnMage:MovieClip = turnMage as MovieClip;
public static var turnHealer:MovieClip = turnHealer as MovieClip;
public static var tGo = new tGo();
public static var turnTimer:Timer = new Timer(500, 100);
turnTimer.addEventListener(TimerEvent.TIMER, CounterCode);
public function CounterCode(Event:TimerEvent):void {
var randChoice;
trace(fighterCount);
fighterCount += Fighter.aSpeed;
rogueCount += Rogue.aSpeed;
mageCount += Mage.aSpeed;
healerCount += Healer.aSpeed;
if(monsCount >= 100) {
whoTurn = "monT";
turnTimer.stop();
randChoice();
}
if(fighterCount >= 100) {
whoTurn = "fighterT";
turnTimer.stop();
trace("stop");
tGo();
}
if(rogueCount >= 100) {
whoTurn = "rogueT";
turnTimer.stop();
tGo();
}
if(mageCount >= 100) {
whoTurn = "mageT";
turnTimer.stop();
tGo();
}
if(healerCount >= 100) {
whoTurn = "healerT";
turnTimer.stop();
tGo();
}
}
}
任何人都知道解决方案吗?
答案 0 :(得分:2)
您应该能够做到这样的事情: -
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode(get_permalink($post->ID)); ?>"><i class="fa fa-facebook"></i></a>
以这种方式自己构建链接可以为您提供一些优势。一,你可以根据自己的需要设计风格;第二,您不会依赖可能/会降低网页性能的第三方资源。
以下是social media bookmarking links的完整列表,您可以使用它来构建完全可自定义的链接。