Topic on Talk:Structured Discussions

Jnanaranjan sahu (talkcontribs)

If we are trying to created new section on user talk page where user has enabled structured discussion It is not possible to create new section.

Code:

$page = $wiki->getPage($userName);

$page->setText("Text", 'new');

Jnanaranjan sahu (talkcontribs)
197.218.86.21 (talkcontribs)

Then it needs an update to work for structured discussion, because an API for flow already exists.

Jnanaranjan sahu (talkcontribs)

Ok Thanks

Roan Kattouw (WMF) (talkcontribs)

The first thing you linked to uses something called MessagePoster, which is a nice feature that lets you post to a talk page without knowing if it's a normal talk page or a Flow page; it figures out and does the right thing. Unfortunately, MessagePoster only exists in JS; a version for PHP has been worked on, but it's not ready yet.

If you're trying to post to a Flow page from PHP, I think the best way to do that would be to use an internal API call to call the new-topic API in Flow.

Reply to "Unabel to post message programmatically to user talk"