Create a Photo Competition App accessible to members on my network. - Build2024-03-29T12:50:55Zhttp://build.ning.com/forum/topics/create-a-photo-competition-app-accessible-to-members-on-my?commentId=6308082%3AComment%3A16562&feed=yes&xn_auth=noThanks Phillip.
- Belal
Phill…tag:build.ning.com,2012-05-22:6308082:Comment:167542012-05-22T20:14:19.804ZBelalhttp://build.ning.com/profile/Belal
<p>Thanks Phillip.</p>
<p>- Belal</p>
<p><br></br><br></br><cite>Phillip Pearson said:</cite></p>
<blockquote cite="http://build.ning.com/forum/topics/create-a-photo-competition-app-accessible-to-members-on-my?page=1&commentId=6308082%3AComment%3A16922&x=1#6308082Comment16922"><div><div class="xg_user_generated"><p>As for your error, try prepending @ rather than @\ to the URL. (This is a cURL thing -- see …</p>
</div>
</div>
</blockquote>
<p>Thanks Phillip.</p>
<p>- Belal</p>
<p><br/><br/><cite>Phillip Pearson said:</cite></p>
<blockquote cite="http://build.ning.com/forum/topics/create-a-photo-competition-app-accessible-to-members-on-my?page=1&commentId=6308082%3AComment%3A16922&x=1#6308082Comment16922"><div><div class="xg_user_generated"><p>As for your error, try prepending @ rather than @\ to the URL. (This is a cURL thing -- see <a href="http://us.php.net/manual/en/function.curl-setopt.php" target="_blank">http://us.php.net/manual/en/function.curl-setopt.php</a>, in particular example #2).</p>
</div>
</div>
</blockquote> As for your error, try prepen…tag:build.ning.com,2012-05-16:6308082:Comment:169222012-05-16T18:17:18.026ZPhillip Pearsonhttp://build.ning.com/profile/PhillipPearson
<p>As for your error, try prepending @ rather than @\ to the URL. (This is a cURL thing -- see <a href="http://us.php.net/manual/en/function.curl-setopt.php" target="_blank">http://us.php.net/manual/en/function.curl-setopt.php</a>, in particular example #2).</p>
<p>As for your error, try prepending @ rather than @\ to the URL. (This is a cURL thing -- see <a href="http://us.php.net/manual/en/function.curl-setopt.php" target="_blank">http://us.php.net/manual/en/function.curl-setopt.php</a>, in particular example #2).</p> I don't think you can specify…tag:build.ning.com,2012-05-16:6308082:Comment:165742012-05-16T18:10:34.027ZPhillip Pearsonhttp://build.ning.com/profile/PhillipPearson
<p>I don't think you can specify an album name... looking at the documentation and our code, I don't see anything for that.</p>
<p></p>
<p>The name / screenname on the photo are taken from the credentials used to upload it. Authenticate as the user whose details you want to see on the photo.</p>
<p>I don't think you can specify an album name... looking at the documentation and our code, I don't see anything for that.</p>
<p></p>
<p>The name / screenname on the photo are taken from the credentials used to upload it. Authenticate as the user whose details you want to see on the photo.</p> More questions for Phil:
Whil…tag:build.ning.com,2012-05-16:6308082:Comment:167492012-05-16T04:00:45.993ZBelalhttp://build.ning.com/profile/Belal
<p>More questions for Phil:</p>
<p>While adding a photo I'm getting the following error:</p>
<p><strong>Fatal error: Uncaught cURL error: failed creating formpost data thrown</strong></p>
<p> </p>
<p>The reason for this error is probably(see in bold)</p>
<p>$parts = array( "title" => $_POST["title"], </p>
<p>"description" => $_POST["description"], </p>
<p><strong>"file" => "@\C:\Users\BBB\Desktop\DSC03028.jpg"</strong> );</p>
<p>Is Ning API expecting the full local path appended by…</p>
<p>More questions for Phil:</p>
<p>While adding a photo I'm getting the following error:</p>
<p><strong>Fatal error: Uncaught cURL error: failed creating formpost data thrown</strong></p>
<p> </p>
<p>The reason for this error is probably(see in bold)</p>
<p>$parts = array( "title" => $_POST["title"], </p>
<p>"description" => $_POST["description"], </p>
<p><strong>"file" => "@\C:\Users\BBB\Desktop\DSC03028.jpg"</strong> );</p>
<p>Is Ning API expecting the full local path appended by "@\" ?</p>
<p>If so, I need to store the local path value using Javascript and then append "@\" .</p>
<p>Where am I erring in terms of "file" ? Please help.</p>
<p>- Belal</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p> Hi Phil,
My project is to cre…tag:build.ning.com,2012-05-15:6308082:Comment:165732012-05-15T17:33:11.522ZBelalhttp://build.ning.com/profile/Belal
<p>Hi Phil,</p>
<p>My project is to create a Photo Competition.</p>
<p>My tasks:</p>
<p>1. Allow user to add a photo to a photo album.</p>
<p> How can I specify an album name and author (screenname) when adding a photo ?</p>
<p> Can I retrieve a list of unapproved photos for a particular album ?</p>
<p> </p>
<p>Also do you have good examples on how to use the restful api resource links. REST is all new to me.</p>
<p>Please help.</p>
<p>- Belal</p>
<p> </p>
<p>Hi Phil,</p>
<p>My project is to create a Photo Competition.</p>
<p>My tasks:</p>
<p>1. Allow user to add a photo to a photo album.</p>
<p> How can I specify an album name and author (screenname) when adding a photo ?</p>
<p> Can I retrieve a list of unapproved photos for a particular album ?</p>
<p> </p>
<p>Also do you have good examples on how to use the restful api resource links. REST is all new to me.</p>
<p>Please help.</p>
<p>- Belal</p>
<p> </p> That's odd. Perhaps set_incl…tag:build.ning.com,2012-05-14:6308082:Comment:165682012-05-14T17:26:50.518ZPhillip Pearsonhttp://build.ning.com/profile/PhillipPearson
<p>That's odd. Perhaps set_include_path isn't working on your server? Glad to hear you got it working!</p>
<p>That's odd. Perhaps set_include_path isn't working on your server? Glad to hear you got it working!</p> Hi Phil,
It worked.
1. I had…tag:build.ning.com,2012-05-11:6308082:Comment:166702012-05-11T00:03:19.374ZBelalhttp://build.ning.com/profile/Belal
<p>Hi Phil,</p>
<p>It worked.</p>
<p>1. I had to fix the path in NingObject.php, for…</p>
<p>Hi Phil,</p>
<p>It worked.</p>
<p>1. I had to fix the path in NingObject.php, for instance:</p>
<p>----------------------------------</p>
<p><?php</p>
<p>require_once('NingApi.php');</p>
<p>require_once('objects/NingActivityItem.php');</p>
<p>require_once('objects/NingBlogPost.php');</p>
<p>require_once('objects/NingBroadcastMessage.php');</p>
<p>require_once('objects/NingComment.php');</p>
<p>require_once('objects/NingNetwork.php');</p>
<p>require_once('objects/NingPhoto.php');</p>
<p>require_once('objects/NingUser.php');</p>
<p>require_once('objects/NingVideo.php');</p>
<p>require_once('objects/NingFriend.php');</p>
<p>require_once('objects/NingTag.php');</p>
<p>----------------------------------</p>
<p>2. I also had to fix the path in all the files under the 'objects' folder.</p>
<p>For instance, in NingActivityItem.php, I changed the path where it calls NingObject.php</p>
<p>from</p>
<p>require_once('NingObject.php');</p>
<p>to</p>
<p>require_once('ning-api-php/src/NingObject.php');</p>
<p> </p>
<p>In short, the objects in the 'object' folder extend NingObject, but they couldn't find NingObject so the file path had to be fixed accordingly.</p>
<p>Thanks again.</p>
<p>- Belal</p>
<p> </p>
<p> </p> The error there is in NingObj…tag:build.ning.com,2012-05-10:6308082:Comment:168412012-05-10T04:02:52.755ZPhillip Pearsonhttp://build.ning.com/profile/PhillipPearson
<p>The error there is in NingObject.php, not NingApi.php. Have you copied the 'objects' directory up to the web server? It looks like you have NingApi.php and NingObject.php but not objects/NingActivityItem.php.</p>
<p>The error there is in NingObject.php, not NingApi.php. Have you copied the 'objects' directory up to the web server? It looks like you have NingApi.php and NingObject.php but not objects/NingActivityItem.php.</p> Hi Phil,
Thanks for getting b…tag:build.ning.com,2012-05-10:6308082:Comment:165622012-05-10T03:43:41.077ZBelalhttp://build.ning.com/profile/Belal
<p>Hi Phil,</p>
<p>Thanks for getting back to me.</p>
<p>I put the Ning API files in my GoDaddy server account where I'm running Wordpress.</p>
<p>Below are the first 7 lines of my NingApi.php file:</p>
<p>1 <?php</p>
<p>2 define('SRC_PATH', __DIR__);</p>
<p>3 define('OBJECTS_PATH', SRC_PATH . '/objects');</p>
<p>4 set_include_path(get_include_path() . PATH_SEPARATOR . SRC_PATH . PATH_SEPARATOR . OBJECTS_PATH);</p>
<p>5 require_once('OAuth.php');</p>
<p>6…</p>
<p>Hi Phil,</p>
<p>Thanks for getting back to me.</p>
<p>I put the Ning API files in my GoDaddy server account where I'm running Wordpress.</p>
<p>Below are the first 7 lines of my NingApi.php file:</p>
<p>1 <?php</p>
<p>2 define('SRC_PATH', __DIR__);</p>
<p>3 define('OBJECTS_PATH', SRC_PATH . '/objects');</p>
<p>4 set_include_path(get_include_path() . PATH_SEPARATOR . SRC_PATH . PATH_SEPARATOR . OBJECTS_PATH);</p>
<p>5 require_once('OAuth.php');</p>
<p>6 require_once('NingException.php');</p>
<p>7 require_once('NingObject.php');</p>
<p> </p>
<p>When I test, I can access the NingApi.php file. I get an error in line 4 and line 7(when NingObject.php is being called).</p>
<p> </p>
<p>Error:</p>
<p>Warning: require_once(NingActivityItem.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/m/o/n/monitor12/html/app/ning-api-php/src/NingObject.php on line 4</p>
<p>Fatal error: require_once() [function.require]: Failed opening required 'NingActivityItem.php' (include_path='.:/usr/local/php5/lib/php:__DIR__:__DIR__/objects') in /home/content/m/o/n/monitor12/html/app/ning-api-php/src/NingObject.php on line 4</p>
<p> </p>
<p>The 'absolute path' is on my server acct is "/home/content/m/o/n/monitor12/html/".</p>
<p>I think the error that I am getting is because of the 'absolute path'. It may also be a Wordpress problem.</p>
<p>Please suggest a solution.</p>
<p>Thanks</p>
<p>- Belal </p>
<p> </p> Hi Belal,
1. To access the c…tag:build.ning.com,2012-05-10:6308082:Comment:168382012-05-10T00:36:02.917ZPhillip Pearsonhttp://build.ning.com/profile/PhillipPearson
<p>Hi Belal,</p>
<p></p>
<p>1. To access the consumer key and secret, browse to the /main/extend/keys page on your Pro network. More details here: <a href="http://build.ning.com/profiles/blogs/getting-started" target="_blank">http://build.ning.com/profiles/blogs/getting-started</a></p>
<p></p>
<p>2. Yes, you'll need to have your own server in order to make requests to Ning. If you're working in PHP, a Linux shared hosting account on GoDaddy should be sufficient. Here's a guide to getting…</p>
<p>Hi Belal,</p>
<p></p>
<p>1. To access the consumer key and secret, browse to the /main/extend/keys page on your Pro network. More details here: <a href="http://build.ning.com/profiles/blogs/getting-started" target="_blank">http://build.ning.com/profiles/blogs/getting-started</a></p>
<p></p>
<p>2. Yes, you'll need to have your own server in order to make requests to Ning. If you're working in PHP, a Linux shared hosting account on GoDaddy should be sufficient. Here's a guide to getting going in PHP: <a href="http://developer.ning.com/docs/ningapi/1.0/examples/php/php.html" target="_blank">http://developer.ning.com/docs/ningapi/1.0/examples/php/php.html</a></p>
<p></p>
<p>Let me know if you have any more questions.</p>
<p></p>
<p>- Phil</p>