[webkit-gtk] getting current uri from webkitgtk

gaurav info at anandlinux.com
Wed Jun 12 03:25:36 PDT 2013


Hi Everyone,

I'm building a facebook app for which i need to authenticate a user. i'm 
making a linux based application using c. I needed a browser for 
authentication so using webkitgtk. Now here's my question. How to get 
current uri from webkitgtk?

for generating oauth access token i need to access a parameter "code" 
from url. later on i will require content of page shown by webkitgtk. 
Please let me know about them. So far i have tried following code but 
getting null

|gchar* url_with_code;
     url_with_code=webkit_web_view_get_uri(WEBKIT_WEB_VIEW (web_view));
     printf("\n-----------------------------------\n%s\n-----------------------------------\n",url_with_code);
|


    o/p is


    (null)

I know that webkit_web_view_get_uri will return null when webkitgtk is 
in progress. but how would i monitor its progress. i don't know how to 
use webkit_web_view_get_progress() to monitor progress. if i put it in 
while loop the application hangs.

Please post a solution or reference.

Regards,
Gaurav

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20130612/bec022f1/attachment-0001.html>


More information about the webkit-gtk mailing list