Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to access data from a Facebook page. I've got the app setup and generated my access_token.
When I put the URL into my web browser (in the format https://graph.facebook.com/APP_ID/feed?access_token=MY_TOKEN) I see the json response properly. However, when I put that same url into the URL field for the import, I get:
The URL https://graph.facebook.com/APP_ID/feed?access_token=MY_TOKEN is invalid.
Anyone get this to work recently? (wondering if FB changed anything?)
Comment | File | Size | Author |
---|---|---|---|
#5 | feeds-vaid_url-1688294-5.patch | 1.31 KB | twistor |
Comments
Comment #1
jomue CreditAttribution: jomue commentedThis is not a parser issue. If the URL is invalid, its a problem with the fetcher.
I assume you are using the basic HTTP fetcher. So the problem lies in the function feeds_valid_url which - for some reason - does not validate your URL. This seems really odd since the very same URL works in the browser...
Maybe you could check on that regex in feeds_valid_url and try to figure why it does not match?
Comment #2
twistor CreditAttribution: twistor commentedhttps://graph.facebook.com/APP_ID/feed?access_token=MY_TOKEN
passes validation. I'm guessing it's something in your APP_ID or MY_TOKEN that's breaking. I understand if you don't want to share that, but we can't help much either. Could you change the letters and numbers, but leave any special characters?Comment #3
Rob_Feature CreditAttribution: Rob_Feature commentedI regenerated my app secret, which then regenerates a new access token. I tried that one and got the same result. Any help on how to further troubleshoot this?
I just reset my secret one more time so I can show you the URL I'm using. Here it is:
(obviously this doesnt work in the browser anymore since I reset the secret again...I'm just posting it here so you can see the format that's failing)
Comment #4
Rob_Feature CreditAttribution: Rob_Feature commentedre-opening the issue....and in case its of any interest, here's my feeds importer
Comment #5
twistor CreditAttribution: twistor commentedThis should do it. I would like at least a few people to test it though.
Comment #6
twistor CreditAttribution: twistor commentedtagging
Comment #7
Rob_Feature CreditAttribution: Rob_Feature commentedHmm..did you intend to leave this in the patch?
Comment #8
twistor CreditAttribution: twistor commentedYes, it adds this case into the test. The test fails without the change to the regex.
Comment #9
Rob_Feature CreditAttribution: Rob_Feature commentedThe patch applied to dev cleanly, but it didn't work. I hit 'import' and instead of giving me an error absolutely nothing happens. No error. No log entry. Nothing. It's almost as if it broke the submit button somehow.
Comment #10
Rob_Feature CreditAttribution: Rob_Feature commentedDoh, scratch that...I apparently had part of the feed importer disabled. It looks like it took the url properly! Calling this reviewed and tested.
Comment #11
twistor CreditAttribution: twistor commented7.x http://drupalcode.org/project/feeds.git/commit/35d6097
Comment #12
twistor CreditAttribution: twistor commentedComment #13
twistor CreditAttribution: twistor commentedComment #14
twistor CreditAttribution: twistor commented6.x http://drupalcode.org/project/feeds.git/commit/acf7cf5
Comment #15
twistor CreditAttribution: twistor commented