1
I’m making an application to post on my fan pages, already log in, list the fan pages, it’s all right.
I’m just not getting to put the text in the facebook text box.
Look here:
<div data-block="true" data-offset-key="72l55-0-0" class="_209g _2vxa">
<span data-offset-key="72l55-0-0">
<span data-text="true">Preciso colocar o texto aqui!!!</span>
</span>
HtmlElementCollection items = webBrowser1.Document.GetElementsByTagName("div");
foreach (HtmlElement item in items)
{
if (item.GetAttribute("classname") == "_209g _2vxa")
{
item.InnerText = "oiii " + DateTime.Now;
item.InvokeMember("click");
//SendKeys.Send("{ENTER}");
}
}
It’s a silly question, but wouldn’t it be better to use the Facebook API?
– Randrade
Randrade, problem that the API does not let me publish in Closed Groups, only Public Groups.
– William
In this case, you are wanting to do something that is not allowed by Facebook. It is worth mentioning that this can cause a ban on the account in which you will be making the insertions.
– Randrade
Yes is allowed as long as you use the browser! Where this is prohibited?
– William
If it is allowed, it has in the API, for example, the Facebook app for Android normally posts in closed groups, so it uses the Facebook API.
– CypherPotato