Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-05-2011, 12:21 PM   #1 (permalink)
Registered Member
 
Join Date: Jul 2010
Posts: 10
Offek is on a distinguished road
Exclamation Upload video to YouTube or Facebook? PLEASE HELP!

Hey guys,

I'm trying to find a way to upload a video to YouTube or Facebook...
I know It is possible as some apps use it.
I was scanning the web for hours but no results...
I know it's somehow related to GData.
Can someone PLEASE help me with this?

Thanks in advance!
Offek is offline   Reply With Quote
Old 01-05-2011, 12:36 PM   #2 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,971
Bertrand21 is on a distinguished road
Default

Quote:
Originally Posted by Offek View Post
Hey guys,

I'm trying to find a way to upload a video to YouTube or Facebook...
I know It is possible as some apps use it.
I was scanning the web for hours but no results...
I know it's somehow related to GData.
Can someone PLEASE help me with this?

Thanks in advance!
YouTube has an API. Look it up. You can do it without the whole GData project.
__________________
Haters gonna Hate
Likers gonna Like
Bertrand21 is offline   Reply With Quote
Old 01-05-2011, 07:34 PM   #3 (permalink)
Registered Member
 
Join Date: Jul 2010
Posts: 10
Offek is on a distinguished road
Exclamation PLEASE HELP ME

Quote:
Originally Posted by Bertrand21 View Post
YouTube has an API. Look it up. You can do it without the whole GData project.
It all seems to go back to GData somehow...
I found a sample code: Here
It keeps getting me a bunch of errors such as Code=400, "the operation couldn't be completed".
Can you please try it and tell me what's wrong?
I put the developer key as my own and the Client ID as the name of the product i registered...

Thanks A LOT in advance!
Offek is offline   Reply With Quote
Old 01-05-2011, 08:08 PM   #4 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,971
Bertrand21 is on a distinguished road
Default

Quote:
Originally Posted by Offek View Post
It all seems to go back to GData somehow...
I found a sample code: Here
It keeps getting me a bunch of errors such as Code=400, "the operation couldn't be completed".
Can you please try it and tell me what's wrong?
I put the developer key as my own and the Client ID as the name of the product i registered...

Thanks A LOT in advance!
If you read the error messages you would understand...

From Google:
too_long -This code indicates that an XML element's value exceeds the maximum allowable length. For example, video titles must be 60 characters or less.
Code:
<?xml version='1.0' encoding='UTF-8'?>
<errors>
  <error>
    <domain>yt:validation</domain>
    <code>too_long</code>
    <location type='xpath'>media:group/media:title/text()</location>
  </error>
</errors>

Your keywords are too long in the example. Shorten them...
Also, I noticed it only worked when i used my YouTube username rather than the gmail email address



Read the docs for the API here:
http://code.google.com/apis/youtube/...Service_errors
__________________
Haters gonna Hate
Likers gonna Like

Last edited by Bertrand21; 01-05-2011 at 08:11 PM. Reason: Added Docs Link
Bertrand21 is offline   Reply With Quote
Old 01-05-2011, 11:48 PM   #5 (permalink)
Registered Member
 
Join Date: Jul 2010
Posts: 10
Offek is on a distinguished road
Default THANKS!

Quote:
Originally Posted by Bertrand21 View Post
If you read the error messages you would understand...

From Google:
too_long -This code indicates that an XML element's value exceeds the maximum allowable length. For example, video titles must be 60 characters or less.
Code:
<?xml version='1.0' encoding='UTF-8'?>
<errors>
  <error>
    <domain>yt:validation</domain>
    <code>too_long</code>
    <location type='xpath'>media:group/media:title/text()</location>
  </error>
</errors>

Your keywords are too long in the example. Shorten them...
Also, I noticed it only worked when i used my YouTube username rather than the gmail email address



Read the docs for the API here:
Developer's Guide: Data API Protocol - YouTube APIs and Tools - Google Code
Hey there,
Thank you so much for your help, I really appreciate it!
I finally got this to work thanks to your help
Can you please tell me if there is any way I can convert this code to make it upload to Facebook? If not, can you give me an idea of where to start?
I read about REST API video.upload but I have no idea of how to apply it..

Thanks A LOT for your EFFORT and HELP!

Last edited by Offek; 01-06-2011 at 01:17 AM.
Offek is offline   Reply With Quote
Old 01-06-2011, 01:19 AM   #6 (permalink)
Registered Member
 
johnyo's Avatar
 
Join Date: Dec 2010
Location: Los Angeles, CA
Posts: 52
johnyo is on a distinguished road
Default

Quote:
Originally Posted by Offek View Post
Hey there,
Thank you so much for your help, I really appreciate it!
I finally got this to work thanks to your help
Can you please tell me if there is any way I can convert this code to make it upload to Facebook? If not, can you give me an idea of where to start?

Thanks A LOT for your EFFORT and HELP!
Once you have it uploaded to youtube you could take that link and just use Facebook's SDK to post the link to a users wall via stream.publish. If it's a youtube video, I think Facebook usually automatically puts up the video thumbnail right next to it without you having to ask, although I'm not sure if they do that when its posted via a mobile device.

Here's facebook's SDK. The example application has stream.publish already implemented last time I checked.
https://github.com/facebook/facebook-ios-sdk
johnyo is offline   Reply With Quote
Old 01-06-2011, 03:08 AM   #7 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,971
Bertrand21 is on a distinguished road
Default

Quote:
Originally Posted by Offek View Post
Hey there,
Thank you so much for your help, I really appreciate it!
I finally got this to work thanks to your help
Can you please tell me if there is any way I can convert this code to make it upload to Facebook? If not, can you give me an idea of where to start?
I read about REST API video.upload but I have no idea of how to apply it..

Thanks A LOT for your EFFORT and HELP!
You are welcome. The Facebook API is a totally different ballpark. You will
Need to read up on HTTP POST and all that mumbojumbo. It's not super difficult but not as easy as using the youTube GData Code.
__________________
Haters gonna Hate
Likers gonna Like
Bertrand21 is offline   Reply With Quote
Old 12-18-2011, 01:47 PM   #8 (permalink)
Registered Member
 
Join Date: Jul 2010
Posts: 9
mavster07 is on a distinguished road
Default

Quote:
Originally Posted by johnyo View Post
Once you have it uploaded to youtube you could take that link and just use Facebook's SDK to post the link to a users wall via stream.publish. If it's a youtube video, I think Facebook usually automatically puts up the video thumbnail right next to it without you having to ask, although I'm not sure if they do that when its posted via a mobile device.

Here's facebook's SDK. The example application has stream.publish already implemented last time I checked.
https://github.com/facebook/facebook-ios-sdk


Hi

Regarding your post, can you advise how one can, once having immediately posted a video to YouTube via the gdata YouTube api, then share that unique URL YouTube generates via email. I know how to do the email bit but how to extract the URL I'm not sure of.

Would appreciate any help or code samples you could offer.
mavster07 is offline   Reply With Quote
Reply

Bookmarks

Tags
gdata, upload, youtube

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 365
7 members and 358 guests
blueorb, fredidf, iAppDeveloper, iGamesDev, mottdog, sacha1996, Touchmint
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:31 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0