Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Q2A Core by
edited by
Hi there using this API how can i post anonymously POST Question ?

	require_once '/PATH/TO/qa-include/qa-base.php';

	require_once QA_INCLUDE_DIR.'qa-app-users.php';
	require_once QA_INCLUDE_DIR.'qa-app-posts.php';
	$type='Q'; // question
	$parentid=null; // does not follow another answer
	$title='Why do birds sing?';
	$content='And why do they fall in love?';
	$format=''; // plain text
	$categoryid=null; // assume no category
	$tags=array('birds', 'sing', 'love');
	qa_post_create($type, $parentid, $title, $content, $format, $categoryid, $tags, $userid);

2 Answers

0 votes
selected by
Best answer
Please look at the function definition in qa-app-posts.php in Q2A 1.6.
Thanks it helped me
0 votes

Here what I understood and according to my Logic...

See qa-app-post-create.php may be you will get more idea how it works..

qa_combine_notify_email() // this function checks whether usre is logged in or anonymous and entered value. which is used in 

qa_question_create() and this function called in qa_post_create() which you are using in your code.

So when you create a post it will check for logged in user id and if not than will consider anonymous and insert data accordingly. Just you need to get email ID from them.

THank u so Much