Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8122571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:52:38+00:00 2026-06-06T05:52:38+00:00

I have successfully created a custom Facebook open graph action, and have been able

  • 0

I have successfully created a custom Facebook open graph action, and have been able to post it from my facebook app. However, Facebooks API to post, was slowing my user experience down, so I created a queue table, that I want to execute from cron outside the user experience.

The table contains a field with the full post request, something like this:

https://graph.facebook.com/me/mynamespace:my_action?custom_item=https://www.mysite .com/thefolder/&access_token=XXXXXXX

So my cron worker will run every 2 mins.. How do I get PHP to run CURL (or something) on the above Asynchronously, i.e. not wait for facebook to respond, so I can churn through say 100 in a minute (should I be so lucky)?

oh and b) should I replace "/me/" with the persons fb user id?

Note, I am not a linux person. thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:52:40+00:00Added an answer on June 6, 2026 at 5:52 am

    However, Facebooks API to post, was slooooowing my user experience down

    First of all, how is it slowing it down? Are you making a server-side or client-side call to the API?

    If you’d do it client-side, it’d already be asynchronous, so there shouldn’t be much slowing down that would affect user experience.

    How do I get PHP to run CURL (or something) on the above Asynchronously, i.e. not wait for facebook to respond, so I can churn through say 100 in a minute (should I be so lucky)?

    I haven’t use cURL “asynchronously” yet, but a quick google search suggest that you can try it setting CURLOPT_TIMEOUT or on up-to-date systems even CURLOPT_TIMEOUT_MS to a value of 1. But I can’t tell you how reliable that’ll be; if Facebook’s API will process it correctly if the client (your server in this case) closes the connection quickly, etc.

    I’m not sure if doing this by cron is such a good idea.

    If you can’t do the API call client-side, as suggested above, because you require your app access token to be send for your actions to be published, then I’d suggest still doing it server-side, but not via cron, but triggered by the user himself, by embedding an IMG or SCRIPT element into you’re page (put out by PHP if you’re directing the user to a new page, or created and put into the DOM client-side via JavaScript), which has it’s source set as the address of your PHP script publishing the action. If you use a SCRIPT element you could even control the outcome of the operation and react to it client-side, by just returning appropriate JavaScript code in the response.

    I’d think this approach should not slow down user experience noticably, and I’d also guess it might be more reliable, than “asynchronous” cURL request fired in the hundreds by a cron-called script.

    oh and b) should I replace “/me/” with the persons fb user id?

    With a user access token provided in the call the API can figure this out by itself.

    But if you’re using an app access token, then you have to use the user-id, because otherwise the API has no way of knowing which user is meant in the call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully created an app that reads from a bundled .plist file and
I've create a Custom Object/Action/Aggregations for my app. https://graph.facebook.com/10151038251679973 All is working fine but
i have successfully created provisioning and distribution certificates and ready to upload my app.
I have a custom UITableViewCell which I created in Interface Builder. I am successfully
I have created custom workflow and successfully deployed it on Alfresco. I just copied
I have created a custom labeller for CC.Net which is working almost perfectly, however
Good morning, I've successfully created a little app that registers itself under a custom
I have created a custom SharePoint web service that was deployed to, and successfully
I am making an Android app, and have created a custom view to do
I have successfully created a custom AccessDecisionVoter class and tied it into my web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.