2013-08-21 25 views
0

在我的應用程序中,我必須將Vimeo帳戶中可用的視頻集成到我的應用程序中。以便用戶可以瀏覽視頻並進行播放,無需上傳視頻。我已經獲得了客戶端密鑰和密鑰。你能否幫我完成剩下的程序。我已經閱讀了那裏的文檔,但迪姆理解它。我想要檢索的視頻不是公開視頻。我想檢索屬於特定用戶帳戶的視頻在ios應用程序中集成vimeo視頻

回答

0

我在嘗試使用不同的可用庫之後解決了它.GOAOAuth,OAuthConsumer,GTMAuth這些都是OAuth的優秀庫。但是,如果您想專門爲Vimeo使用OAuth,那麼最好使用OAuthConsumer,因爲它非常簡單並且使用它可以輕鬆完成Vimeo身份驗證中的所有步驟,但如果您想要Twitter或其他網絡,則其他庫很有用。

完成OAuth步驟並獲得OAuthVerifier和令牌後,必須遵循與獲取令牌相同的方法,但需要使用要在高級api方法列表中使用的方法替換url。如果您想了解方法標題和您必須通過的參數,請參閱Vimeo遊樂場。

+0

嗨,OAuthConsumer是OAuth的1.0吧?它現在工作嗎?你嘗試過oauth 2.0嗎? – Durgaprasad

1

或者你也可以通過網絡查看播放視頻

NSMutableString *html = [[NSMutableString alloc] initWithCapacity:1] ; 
[html appendString:@"<html><head>"]; 
[html appendString:@"<style type=\"text/css\">"]; 
[html appendString:@"body {"]; 
[html appendString:@"background-color: transparent;"]; 
[html appendString:@"color: white;"]; 
[html appendString:@"}"]; 
[html appendString:@"</style>"]; 
[html appendString:@"</head><body style=\"margin:0\">"]; 
[html appendString:@"<iframe src=\"//player.vimeo.com/video/84403700?autoplay=1&amp;loop=1\" width=\"1024\" height=\"768\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>"]; 
[html appendString:@"</body></html>"]; 


[viewWeb loadHTMLString:html baseURL:urlMovie]; 
+1

'''initWithCapacity:1'''?這似乎很愚蠢。 – MrJre