Click here to Skip to main content
15,881,801 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
Hello,
I am developing an application by which we can schedule our posts for future & which will be automatically posted to facebook on scheduled time.
I am able to post when I am logged in to facebook using my web application.
but I have no idea how will i post on scheduled time when i am not logged in to the facebook.
How will facebook identify that post should be posted on my wall & not on others wall.
Can any one help me.
I am using c#, asp.net for my application.
Posted
Updated 18-Oct-12 3:36am
v2

1 solution

1) A scheduler should usually run as a Windows Service.
2) That service should be configured that it can log in and perform the post whenever one is required. That way Facebook knows where to put it.
 
Share this answer
 
Comments
I.explore.code 18-Oct-12 10:50am    
but if there are multiple users using the scheduling website, then you would have to save their schedules in a database, wouldn't you? and then somehow make the service aware that the scehdules are available and then have the service execute all those schedules without a slip. Wouldn't this require some sort of thread spawning for each schedule so that one service doesn't get overloaded with all the requests and running the risk of missing a schedule. May be I am overthinking this one, and may be there is a simpler idea. What do you reckon?
fjdiewornncalwe 18-Oct-12 10:58am    
Anything you do that requires data to be static for any length of time should use some sort of persistent storage. I don't think you're over thinking this as a properly designed solution requires substantial thought. For multiple users, you may need to keep encrypted profile information including login information in storage as well and associate the messages that way. I hate to say it, but most people I know who have Facebook hate constant impersonal notifications, so a lot of people may view your auto-posts as spammish.
I.explore.code 18-Oct-12 11:17am    
Well, by users I meant companies that might want to use a product like this to schedule posts on Facebook for product marketing of sorts. May be based on certain analytics and stats they might wanna schedule posts for say, Christmas Eve. This would still require the server to spawn "x" number of threads each taking care of one schedule, but the question then arises "how do you make a thread poll for date and time?" is it ok to have a thread run in a while loop checking time every second to see if its time yet and if it is, then post stuff and terminate itself? Would the service need to keep track of which threads have finished and which are still running? I am only assuming that in this case data sharing among threads and hence inter-thread communication is not needed.

I am sorry its not even my question, yet I am intrigued about this problem :)
fjdiewornncalwe 18-Oct-12 12:11pm    
You wouldn't want to have each thread check for data/time of a notification, etc. You would want one main manager thread to check and see if work needs to be done and then spawn stuff off from there with specific, encapsulated behavior. Let the child threads just take in a message or collection of messages to work on. The threads shouldn't care about when the message is to be delivered. They should just be the delivery boys.
Member 7804762 19-Oct-12 16:07pm    
I know this but How will facebook identify that which post should go to which page or profile ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900