PDA

View Full Version : How can I connect to facebook in my code?



kishoreksnair
16th September 2011, 05:00
i have downloaded qfacebookconnect from
http://gitorious.org/qfacebookconnect/qfacebookconnect/trees/master

but an error occured during the runtime?

:: error: cannot open file '../debug/libqfacebookconnect.a'

.pro file:


#-------------------------------------------------
#
# Project created by QtCreator 2009-11-20T00:54:21
#
#-------------------------------------------------

QT += network webkit xml

TARGET = sample
TEMPLATE = app
DESTDIR = ../debug

SOURCES += main.cpp\
mainwindow.cpp

HEADERS += mainwindow.h

FORMS += mainwindow.ui


INCLUDEPATH = ../inc/
win32:LIBS += ../debug/libqfacebookconnect.a
unix:LIBS += ../debug/libqfacebookconnect.so

symbian: {
TARGET.CAPABILITY = NetworkServices # Symbian specific, we just need network access
TARGET.UID3 = 0xA89FA522 # Symbian specific, unprotected uid3 from symbiansigned.com

INCLUDEPATH += /epoc32/include/stdapis # this seems to be a bug.
LIBS += -lqfacebookconnect

libqfacebookconnect.sources = qfacebookconnect.dll
libqfacebookconnect.path = \sys\bin
DEPLOYMENT += libqfacebookconnect
}

ICON = gfx/fb.svg

ChrisW67
16th September 2011, 05:07
Which part of the error message is not clear? Where is the compiled libqfacebook.a library on your system?

BTW: The error message is not a run time error message. It is a linker error message.

kishoreksnair
16th September 2011, 06:26
I am new in QT ....I have downloaded qfacebookconnect project from:
http://gitorious.org/qfacebookconnec...t/trees/master

there is no libqfacebook.a in our project...there are two pro files in this project such as:libqfacebook.pro and sample.pro.

First i have run the qfacebookconnect then generate some files in debug folder:qfacebookconnect.lib,qfacebookconnect.dll,q facebookconnect.ilk etc.

How ca i Run this project? Now i am developing a QT GUI application...i want to connect facebook in my app?? please mention steps needed for run the qfacebookconnect application..

Added after 44 minutes:

thank u very much.....it has been worked successfully....after copy the lib file into debug folder of sample..change the name in pro file.

Now i have some problems in FBUserid....cannot retrieve the user id??

stampede
16th September 2011, 08:20
This "Facebook" must be quite popular, two threads about it today : Error-in-retrieving-data-from-facebook-to-qt-gui-application (http://www.qtcentre.org/threads/44654-Error-in-retrieving-data-from-facebook-to-qt-gui-application) :P

Now i have some problems in FBUserid....cannot retrieve the user id??
There seems to be some kind of wiki on the project site, try searching for info there.

ChrisW67
16th September 2011, 08:35
I am new in QT ....I have downloaded qfacebookconnect project from:
http://gitorious.org/qfacebookconnec...t/trees/master

there is no libqfacebook.a in our project...there are two pro files in this project such as:libqfacebook.pro and sample.pro.

First i have run the qfacebookconnect then generate some files in debug folder:qfacebookconnect.lib,qfacebookconnect.dll,q facebookconnect.ilk etc.

How ca i Run this project? Now i am developing a QT GUI application...i want to connect facebook in my app?? please mention steps needed for run the qfacebookconnect application..

qfacebookconnect is a library... you don't run libraries on their own. You build the qfacebookconnect library in the same fashion that you build the majority of Qt programs:


qmake
nmake (or mingw32-make)
nmake install (if provided)


The sample directory contains an example program that is set up to look for the libraries in the folder above.



thank u very much.....it has been worked successfully....after copy the lib file into debug folder of sample..change the name in pro file.

If there is any chance (I suspect there is) of qfacebookconnect changing then you should change your project PRO to point LIBS at the location of the qfacebookconnect build rather than copying the library file. It is harder to get out of sync this way.


Now i have some problems in FBUserid....cannot retrieve the user id??

Perhaps you should ask the authors of qfacebookconnect how to use their library.