felix
felix

Reputation: 486

Facebook Graph API Scheduled Posts created but not published

I'm using django-facebook's Open Facebook API to try to defer a post with an image to a facebook page. The (relevant part of the) code is:

graph_api = OpenFacebook(integration.long_lived_page_token)
message = "something"
picture = "http://example.com/image.jpg"
d = datetime.datetime.strptime('07-25-2014 06:40 pm UTC', '%m-%d-%Y %I:%M %p %Z')
timestamp = timestamp = int(time.mktime(d.timetuple()))
try:
    facebook_response = graph_api.set('/{0}/feed'.format(
    facebook_page_id), message=message,
    link=picture, picture=picture,
    scheduled_publish_time=timestamp, published=0)
except:
...

This seems to work fine (I get the post id on facebook_response) but when the time comes to post this scheduled post nothing happens. When I check at the facebook page I see an error saying 'Sorry, something went wrong publishing this scheduled post' and offers to delete it or post it then. So, I can't seem to figure out what am I doing wrong. I found a similar question but it does not offer a good answer.

Oh, I forgot to say when I remove timestamp and published=0 parameters (i.e. I post on that exact moment), the post gets created and published on the page's feed.

Upvotes: 4

Views: 997

Answers (0)

Related Questions