×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    53

    how to share link of an video to my facebook account/twitter account

    hello friends

    Actually i want to share the link of an video to my facebook account/twitter account by clicking on the button present in my mobile app..means suppose i have an live video in my app..now there is an buttons for both facbook and twitter..when i can click these button than the link of the video is shared to either of my account ...so hw this can be done..plz suggest

    with regards
    Anshuman

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: how to share link of an video to my facebook account/twitter account

    1. you need to have a server that relay your post to facebook twitter. (need all authentication etc on your server)
    2. you need to have both twitter and facebook libraries in your application.

  3. #3
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    53

    Re: how to share link of an video to my facebook account/twitter account

    yeh that i have..i have done all that things..when i click these button it went to the login page of facebook/twitter..as applicable..after that when i sign in..than i give a text box to share some views..its all work but the thing is that the link to the video is not come in that text box..so hw that can be done..

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: how to share link of an video to my facebook account/twitter account

    Quote Originally Posted by AnshumanBorah View Post
    yeh that i have..i have done all that things..when i click these button it went to the login page of facebook/twitter..as applicable..after that when i sign in..than i give a text box to share some views..its all work but the thing is that the link to the video is not come in that text box..so hw that can be done..
    have you uploaded the video file some where online ?

  5. #5
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    53

    Re: how to share link of an video to my facebook account/twitter account

    ok i will send u the twitter code...

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <QWebView>
    #include <QTextEdit>
    #include <QWebFrame>

    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
    ui->setupUi(this);
    }

    MainWindow::~MainWindow()
    {
    delete ui;
    }

    void MainWindow::SslErrors(QNetworkReply * reply, const QList<QSslError> & errors) {

    reply->ignoreSslErrors(errors);
    }



    void MainWindow:n_pushButton_clicked()
    {

    QWebView *web=new QWebView(this);
    web->resize(this->width(),this->height());

    QObject::connect(web->page()->networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*,const QList<QSslError>&)), this, SLOT(SslErrors(QNetworkReply*,const QList<QSslError>&)));


    web->setUrl(QUrl(QString("http://mobile.twitter.com/?status=")+ui->textEdit->toPlainText())); // so i want the link to be display in that textEdit box

    web->showMaximized();


    }

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: how to share link of an video to my facebook account/twitter account

    yes but the link you have to get it your self by uploading it to some video hosting provider.

  7. #7
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    53

    Re: how to share link of an video to my facebook account/twitter account

    how that can be done..that thing i dont know can u plz suggest me for that..

  8. #8
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: how to share link of an video to my facebook account/twitter account

    have you read these facebook graph doc ?
    http://developers.facebook.com/docs/authentication/
    http://developers.facebook.com/docs/reference/api/link/

    Then you have to use QWebView to authenticate and get the access token ... by adding offline_access permission as param you get a long life token, that means onetime only login.

    Be aware you have to setup a facebook app ,see http://www.facebook.com/developers/

    After that you can use QNetwork api to make http post that includes link and that token in the request
    Last edited by lucarocchi; 2011-04-29 at 23:16.
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  9. #9
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    53

    Re: how to share link of an video to my facebook account/twitter account

    Hello skumar

    Yesterday i ask you a question about..." How to share link of an video to my facebook / twitter account "...i have tried a lot but cant do it..actually my problem is simple...what i want is that i have an online video running in my app..there is an facebookbutton,twitter button...when i press any of the button than i went to a new dialog where there is an textEdit box and loginbutton..when i press the login button the login page is opened.form that process is goes on...all things work...but the thing i want is that in the textEdit box i want the link of the video to be displayed....

    my all things are workin ie on click of any of the twitter button and facebook button the new dialog open..from there i went to the login page..but the thing thats nt workin is the display of video link in the textedit box...
    so please suggest me....
    code for twitter i hv send u.....

    with regards
    Anshuman

  10. #10
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: how to share link of an video to my facebook account/twitter account

    Quote Originally Posted by AnshumanBorah View Post
    ...but the thing thats nt workin is the display of video link in the textedit box...
    Why would that be a problem? It is a simple as calling textEditor->setHtml("This is ... blah ... blah <a href="http://put_link_here">a video link</a>");
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  11. #11
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    53

    Re: how to share link of an video to my facebook account/twitter account

    thanks itomuta..now i want to know whether that link change dynamically for each different video..or it is fixed for a paticular video only...if not how cani made it dynamic...thats means depending on the video its change the link dynamically..

    with regards
    Anshuman

  12. #12
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    53

    Re: how to share link of an video to my facebook account/twitter account

    hello skumar

    As far of my question i had ask u abt "sharing link of an video to my facebook / twitter account " i hv used the code

    textEditor->setHtml(" <a href="http://">a video link</a>");// given by itomuta.

    but i dont understand what i have to write inside "http://" and inside "a video link"

  13. #13
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: how to share link of an video to my facebook account/twitter account

    Quote Originally Posted by AnshumanBorah View Post
    hello skumar

    As far of my question i had ask u abt "sharing link of an video to my facebook / twitter account " i hv used the code

    textEditor->setHtml(" <a href="http://">a video link</a>");// given by itomuta.

    but i dont understand what i have to write inside "http://" and inside "a video link"
    "a video link" is the url that link where you have uploaded the video file.

  14. #14
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    53

    Re: how to share link of an video to my facebook account/twitter account

    now in my app there r lot of online video running..now how can i pass the url of each video dynamically on clicked of pushButton..i mean to say suppose there is a one video running when i click the push button the url of that video is set in the textedit box..again when the video change..then hw the url change...for that ehat i have to do..i hv sent u the code..u just check it

    void MainWindow:n_pushButton_clicked()
    {

    QWebView *web=new QWebView(this);
    web->resize(this->width(),this->height());

    QObject::connect(web->page()->networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*,const QList<QSslError>&)), this, SLOT(SslErrors(QNetworkReply*,const QList<QSslError>&)));

    ui->textEdit->setHtml(""); //what i have to write here..
    web->setUrl(QUrl(QString("http://mobile.twitter.com/?status=")+ui->textEdit->toPlainText()));

    web->showMaximized();


    }

  15. #15
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: how to share link of an video to my facebook account/twitter account

    Anshuman, is this the first program you're writing? There is a forum for begginers where I can move this, and there could be some books that we could recommend as well.
    Other than that, maybe you should slow down and start thinking ...

    You know the URL of the currently played video, otherwise you won't be able to play it. So when the button is pressed, you have to take that URL from whichever object or data structure holds it, and add it to your message.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

Similar Threads

  1. Problem adding user account to company account with subscription to Developer Program
    By tuytscht in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 2
    Last Post: 2011-03-04, 07:45
  2. Replies: 4
    Last Post: 2010-05-25, 13:53
  3. How to access the mails from an gmail account
    By iworktech_kiran in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2009-02-04, 14:39
  4. [split] How to create an account on symbiansigned.com
    By leu_kun in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 2
    Last Post: 2008-09-05, 08:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •