c# - How can i check what messages have been posted to my group page on facebook? -
I have this mode that sends / posts messages / text to my group page on facebook:
< Pre> Private string PostFacebookWall (string accesspoint, string message) {var responsePost = ""; Try {var objFacebookClient = new FacebookClient (accessToken); Var parameter = new dictionary & lt; String, Object & gt; (); Parameter ["message"] = message; ResponsePost = objFacebookClient.Post ("/" + groupID + "/ feed", parameter) .ostring (); } Hold (Exception Pre) {responsePost = "Facebook Posting Error Message:" Ex. message; } Return the response post; }
Then I have a way to check that do not post the same message / text twice:
Private Hashtable already Post = new hashtable (); Private Zero Post Message (for (Int I = 0; I & lt; ScrollLabel._lines.Length; i ++) {for (int x = 0; x & lt; WordsList.words.Length; x ++ ) {If (ScrollLabel._lines [I]. (Word list. [X]) and post already.Contain key (scroll label ._line [i])) {lineToPost = ScrollLabel._lines [i] ; String Testline = Lineopost + Entertainment. NewLine + ScrollLabel._lines [i + 1]; PostfacebookWalk (AccessPageToken, TestLine + EnterpriseNewline + Environment.NewLine + "NasalBeopenUtomity Constantine Dracut"); Already Post add (lineopost, true); numfost + = 1; label7.Text = numberofposts.ToString ();}}}}
Then I have a timer tick that I I update and post messages / text every 10 seconds:
Private zero timer 1 stop (object sender, event aRGS) {counter + = 1; label 9. text = counter Toastring (); Label9.Visible = true; if (counter == 10) {scrollLabel1.Reset (); ScrollLabel1.Text = ""; scrollLabel1.Invalidate (); This.scrollLabel1.Text = combinedString; ScrollLabel1.Invalidate (); Counter = 0; Send message (); }}
The problem is that when Im going on and on again, he continues to post the same post because it shows that the post on my group page already exists Are or Not? I need to check / receive the posts already present on my group page in my Facebook page and then add this post to run the program every time in the list: posting it already, it will be repeated every time I'm not able to post, I'm closing down and starting the program again.
I can already write the contents of the list in a text file and return the text file to the list creator, but be sure to check it or check the post already on my group page Exists at
How do I solve it? The problem is knowing that posts posted are on my group page or not. If my program has not been sent or if they were sent successfully, but if they are in my group page, then do not post it when the program will restart the program.
Comments
Post a Comment