How to allow users programatically to post and view posts regardless of they are trusted contact or not in drupal commons
I found out that commons_trusted_contacts module is setting content access as private while posting for trusted contacts, which add post to user group so that only user's trusted contacts sees posts.

In order to post regardless of users are trusted contact or not, I've changed value of group_content_access to public. This way posts are not assigned to any group so it's visible for all users. In database, gid is then set to 0 instead of uid representing user group. 

Bellow the line I've changed

$wrapper-&gt;group_content_access-&gt;set(OG_CONTENT_ACCESS_PRIVATE);


to

$wrapper-&gt;group_content_access-&gt;set(OG_CONTENT_ACCESS_PUBLIC);