Linux 软件免费装

Fan Count

开发者 valendesigns
更新时间 2010年12月16日 16:11
捐献地址: 去捐款
PHP版本: 2.7 及以上
WordPress版本: 3.0.2

标签

facebook api count fan

下载

1.1 1.2

详情介绍:

Returns a database stored Facebook Fan Count in plain text or number format. Reduces the Facebook Graph API calls by only updating the fan count hourly and serving a database cached result in between. The account you're attempting to get a "Fan Count" from must be a page you can become a fan of. Regular account ID's for non-fan pages will return a zero result. You can use the function <?php fan_count( $id, $default, $echo, $format ); ?> in your theme files. The following is an explanation of the parameters the function excepts. For example, if I was Psdtuts+ and wanted to echo out a fan count that had a fallback or default fan count in the unlikely event nothing is stored in the database or there is a weird zero result returned, I would do the follow. <?php fan_count( 'psdtuts', 15000 ); ?> If I wanted to save the count to a variable as a plain integer that I could add to another count or something similar I would do this. <?php $fan_count = fan_count( 'psdtuts', 15000, false, false ); ?> If I wanted to echo a formatted count form an array of $ids with a fallback, I would do this. <?php fan_count( array( 'psdtuts', 'nettuts' ), 15000 ); ?>

安装:

  1. Upload fan-count folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

升级注意事项:

1.2
  • A change to the Graph API broke v1.1

常见问题:

Does this plugin require any certain PHP functions?

Yes! Your server must have json_decode() available or the plugin will fail to work properly. Basically, you server needs to be running PHP 5.

更新日志:

1.2 1.1 1.0