×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Location
    India
    Posts
    123

    problem with using & in url

    Hey All,

    This is the original url that works fine on browser :

    http://m.facebook.com/dialog/feed?ap...3050457758183& link=http://developers.facebook.com/docs/reference/dialogs/& picture=http://xxx/icon.png&name=any name&description=&redirect_uri=http://www.example.com/response& display=touch&scope=publish_stream

    However if I use it with device I get error saying that I can only use normal characters in url.

    Now if I replace the & in url to &

    http://m.facebook.com/dialog/feed?ap....png&name= any name&description=&redirect_uri=http://www.example.com/response&display=touch&scope=publish_stream

    I am able to bypass the initial error of using only the normal characters and get a new error saying “An error occurred with xxx app. Please try again later.”

    I get this error on both browser and device.


    So plz can any one help me on this.

    Thanks with Regards,
    Vishal.

  2. #2
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: problem with using & in url

    Url do not allow spaces. Remove any ' ' char.

  3. #3
    Regular Contributor
    Join Date
    Feb 2009
    Location
    India
    Posts
    123

    Re: problem with using & in url

    Quote Originally Posted by gnuton View Post
    Url do not allow spaces. Remove any ' ' char.

    Thanks for reply,, I have checked and there are no such ' ' char in the url.

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,561

    Re: problem with using & in url

    Quote Originally Posted by vishalrocks101 View Post
    Thanks for reply,, I have checked and there are no such ' ' char in the url.
    There is a ' ' (space, blank) character in your original post in this thread, between the words "any" and "name", which reads "any name". Use URL-encoding, so that spaces are replaced with %20.

  5. #5
    Regular Contributor
    Join Date
    Feb 2009
    Location
    India
    Posts
    123

    Re: problem with using & in url

    Thanks for the reply .. but After removing all the blank spaces as suggested by you, I am still geting the error messsage as error on line 14 at column 53: expected '#' or '[a-zA-z]' but got '&'
    And one more thing this problem is occuring only on device and not on simulator !!!

    For reference URL being used :

    http://m.facebook.com/dialog/feed?ap...ence/dialogs/& picture=http://xxx/icon.png&name=name&description=&redirect_uri=http://www.example.com/response& display=touch&scope=publish_stream

    Thanks with Regards,
    Vishal

  6. #6
    Registered User
    Join Date
    May 2011
    Location
    New York
    Posts
    11

    Re: problem with using & in url

    If you followed the instructions of gnuton and replaced any spaces with %20, and used standard syntax instead of special characters, the URL should be parsing correctly. Please post the full, correct and updated version of your URL with standard syntax so we can see what the problem might still be.
    To live is divine.

  7. #7
    Registered User
    Join Date
    Jun 2011
    Posts
    5

    Re: problem with using & in url

    Hello Everyone,

    I have encountered with the same problem as vishalrocks101has posted and thus continuing with the thread.

    The url I am using is --> http://www.facebook.com/dialog/feed?...e.com/response

    This url gives me log in page of Facebook. As I log in, it shows me the same error message i.e. expected '#' or '[a-zA-z]' but got '&'
    And no my url doesn't have any blank spaces.

    Of course the link works fine on simulator and the browser but fails to work on my Nokia N8 or E7 device!

    What I am expecting from the Facebook url is to post my application name linking to a website along with the details of the current page of application, and an image to be posted by the user to his\her Facebook wall. Till now, the only possible solution I have been able to figure out is the above link ( which refuses to work on any of my phones ) that I found at http://developers.facebook.com/docs/.../dialogs/feed/
    I am open to any suggestions and advices

    Would be grateful if anyone could help me with the problem

    Thanks

  8. #8
    Super Contributor
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: problem with using & in url

    Quote Originally Posted by Sonia Rykiel View Post
    And no my url doesn't have any blank spaces.
    I beg to differ:
    Your url contains "Dialogs are so easy", sentence which includes 3 (three) blank spaces. you need to urlencode your values before creating your url.

  9. #9
    Registered User
    Join Date
    Jun 2011
    Posts
    5

    Re: problem with using & in url

    @njzk2 : I have replaced blank space in my url with %20.
    Even "Dialogs are so easy" has %20 in place of blank space.

  10. #10
    Registered User
    Join Date
    Jan 2009
    Posts
    172

    Re: problem with using & in url

    Hi,
    I have the same problem
    How to produce
    1. Call the URL feed dialog url
    2. The user is not logged in
    3. Facebook redirect to login page
    4. after login success the problem occur
    error on line 13 at column 53: expected '#' or '[a-zA-z]' but got '&'
    Can you help please it is urgent

    Thanks
    Wael

Similar Threads

  1. Problem with & in QByteArray ?
    By narendar_discover in forum Qt
    Replies: 5
    Last Post: 2011-05-20, 12:30
  2. how to work using Phonon::MediaSource ( const QUrl & url ) to play remote video/audio
    By hrn2k1 in forum Wired and Wireless interfaces (Closed)
    Replies: 4
    Last Post: 2011-04-03, 11:47
  3. Problem in using KPropertyKeyBluetoothGetPHYCount(P&S)
    By huangchen in forum Bluetooth Technology
    Replies: 2
    Last Post: 2010-11-13, 10:00
  4. using url references in smil
    By KlaarMobileEntertainment in forum General Messaging
    Replies: 0
    Last Post: 2009-10-22, 12:49
  5. Problem with HTP URL Request.
    By SymbianTH in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2009-08-26, 11:29

Posting Permissions

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