Linux 软件免费装
Banner图

FB Display Events Shortcode

开发者
更新时间 2016年9月6日 02:26
捐献地址: 去捐款
PHP版本: 3.1 及以上
WordPress版本: 4.6
版权: GPLv2
版权网址: 版权信息

标签

shortcode event list events Facebook fb

下载

1.0 1.1 1.2

详情介绍:

The FB Display Events Shortcode plugin allows you to display list of events from a Facebook on your website using shortcode. Features: Requirements Usage
  1. To display user's events by facebook user name use shortcode [fb_event_list] with attribute fb_user_name, example [fb_event_list fb_user_name="user_name"]
  2. To display user's events by facebook user_id use shortcode [fb_event_list] with attribute fb_user_id, example [fb_event_list fb_user_id="342353464567"]
  3. To display single event use shortcode [fb_event_list] with attribute fb_event_id, example [fb_event_list fb_event_id="4234464534534"]
  4. Optional attributes:
  5. fb_time="upcoming, past, all" - Display upcoming, past or all user's events
  6. limit="value" - limits the number of displayed user's events to a given value

安装:

Automatic
  1. In the admin panel plugins page click Add New
  2. Search for FB Display Events Shortcode
  3. Find FB Display Events Shortcode in the list an click Install Now
  4. Click OK when prompted
  5. Click activate plugin when prompted
  6. In the admin panel under Settings click on FB Event List. Paste your Facebook Developer Access Token in form and save it.
  7. Enjoy!
Manual
  1. Extract fb-display-events-shortcode.zip to your wp-content/plugins directory.
  2. In the admin panel under plugins activate FB Display Events Shortcode.
  3. In the admin panel under Settings click on FB Display Events. Paste your Facebook Developer Access Token in form and save it.
  4. It should now be completely set up and functional
  5. Enjoy!

屏幕截图:

  • Event List
  • Single Event in detail
  • Settings Page

升级注意事项:

1.1 Upgraded data access to fb not only via file_get_contents but also cURL 1.0 Initial release

常见问题:

How to get Facebook Developer Access Token

To get Facebook Developer Access Token, register at developers.facebook.com and create new App. Simply go to https://smashballoon.com/custom-facebook-feed/access-token/ and follow instructions.

How to get Facebook User Name

Go facebook page from you want get username, example https://www.facebook.com/happysadpl/?fref=nf In that case username is happysadpl xxxxxx refers to the Facebook user's name: http://facebook.com/xxxxxxx/?otherCharacters

How to get Facebook User ID

Paste that URL into browser https://graph.facebook.com/XXXXXX?access_token=YYYYY and replace XXXXXX with Facebook User Name, YYYYYY with your access_token You will get json Response with id.

How to get Facebook Event ID

Go to the facebook event from which you want to get an ID. Get the URL from the webbrowser. xxxxxx refers to the event id: https://www.facebook.com/events/xxxxxx/ Example https://www.facebook.com/events/923003774401481/ In that case fb_event_id=923003774401481

Country name is not showing on local development using xampp on windows

That is: cURL Error # 60: SSL certificate problem: unable to get local issuer certificate Follow this link: http://curl.haxx.se/ca/cacert.pem Copy the entire page and save it in a: "cacert.pem". Then in your php.ini file insert or edit the following line: curl.cainfo = "[pathtothisfile]\cacert.pem" example curl.cainfo = "c:\xampp\cacert.pem"

How to check if token is working

Sample below is generated from plugin. Just replace XXXXX with your token. Place that link into browser. If the token is valid you will get data from facebook. You can modify this url. 463776883765579 is user id. Sice and until are timestamps. https://graph.facebook.com/463776883765579/events/attending/?fields=id,name,description,place,timezone,start_time,cover&access_token=XXXXXXXXXXXXXXXXXXX&since=1388534400&until=1468972800

Shortcode displays only text

Try to deactivate other plugins. It may be some sort of collision.

Shortcode not working

If you dont need full place addres try to replace word 'place' with 'location' in fb-display-events-shortcode.php Replace $fields="id,name,description,place,timezone,start_time,cover"; with $fields="id,name,description,location,timezone,start_time,cover"; or $fields="id,name,description,timezone,start_time,cover";

更新日志:

1.2 Fixed missing in Print_event function 1.1 Upgraded data access to fb not only via file_get_contents but also cURL 1.0