How to Add a Comment

Answered

Comments

7 comments

  • Albert Bunick

    **Correction

    return $item->save();<<------ Products my ref_id

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    PodioComment objects does not currently have a save method, so you have to use the static method for sending values to the API. Merely creating an object does not send any data to the API. Some details around making API requests: http://podio.github.io/podio-php/api-requests/

    To create a comment:

    PodioComment::create('item', $item_id, array('value'=> $emailFrom.' wrote on '.$vbdate.':'.ltrim($comment,400)));
    
    0
    Comment actions Permalink
  • Albert Bunick

    Using that method i got the following error.

    Fatal error: Uncaught PodioForbiddenError: "The user with id #### does not have the right comment on item with id 173019127" Request URL: http://api.podio.com/comment/item/##### Stack Trace: #0 /home/public_html/podiophp/lib/Podio.php(293): Podio::request('POST', '/comment/item/1...', Array, Array) #1 /home/public_html/podiophp/models/PodioComment.php(52): Podio::post('/comment/item/1...', Array) #2 /home/public_html/podiophp/emailtoticket.php(94): PodioComment::create('item', '173019127', Array) #3 /home/public_html/podiophp/emailtoticket.php(33): createComment('######', 'Yes i will be w...', '*@*...', '2014-07-06 12:0...') #4 {main} thrown in /home/public_html/podiophp/lib/Podio.php on line 260

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    As the error message suggests, the entity you are authenticating as does now have rights to add a comment on that item. Most likely because comments are disabled for that app or you are authenticating as a user who is not a member of the workspace the app resides in.

    0
    Comment actions Permalink
  • Albert Bunick

    I my database was set to comment on the wrong item. Thanks for your help!

    0
    Comment actions Permalink
  • Lincoln Lemos

    How i can refer a user with this?

    0
    Comment actions Permalink
  • baotony

    Check carefully if the comment is incorrect. If the comment is incorrect, revise it.cheap women's briefs provide。

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk