Facebook活动立即购买ticket_uri

Looks like Facebook has added a new field that you can have a button show up on the Facebook event where people can purchase tickets. I tried to add it to a existing event but just called calling the below which just returns "1" so it appears it works but I don't see a buy now button appearing anywhere. Anyone have any thoughts?

[access_token] => {mytoken} [ticket_uri] => {ticketurl}

Reference: https://developers.facebook.com/docs/reference/api/event/

That event was created on the old events backend, so it won't support the ticket_uri field. You need to go to your Advanced Settings and enable the "Events Timezone" migration, which will move you to the new events backend. Events created from that point on will properly support the ticket_uri field.

You must get a "Page access token" and then post to {page_id}/events. Here's a copy of the steps I've posted a couple of places:

  1. Enable the "Events Timezone migration"
  2. Log into FB as a user that has admin rights on the FB Page that we want events posted to
  3. Use the APPLICATION's ID to build this link to authorize the managing of pages https://www.facebook.com/dialog/oauth?client_id=MY_APP_ID&redirect_uri=MY_SITE_URL&scope=manage_pages,create_event&response_type=token
  4. Exchange token for perm (longer token) https://graph.facebook.com/oauth/access_token?client_id=MY_APP_ID&client_secret=MY_CLIENT_SECRET&grant_type=fb_exchange_token&fb_exchange_token=(token from step 3)
  5. Visit this page, find the PAGE you want to post and copy the new access_token https://graph.facebook.com/me/accounts?access_token= (token from step 4)
  6. Use this last token (from step 5) and the PAGE's ID to post to post the event per the instructions at https://developers.facebook.com/docs/reference/api/page/#events

Note that if you create a lot of events, you will "spam" every user who Like'd the page. FB recently added the 'no_feed_story' option to prevent this.