Posted by Rob_Feature on July 16, 2012 at 9:34pm
4 followers
| Project: | Feeds |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | Needs backport to 6.x |
Issue Summary
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?)
Comments
#1
This 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?
#2
https://graph.facebook.com/APP_ID/feed?access_token=MY_TOKENpasses 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?#3
I 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:
https://graph.facebook.com/mustardseed/feed?access_token=133283760145143|tGew8jbxi1ctfVlYh35CPYij1eE(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)
#4
re-opening the issue....and in case its of any interest, here's my feeds importer
$feeds_importer = new stdClass();$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'fbimporter';
$feeds_importer->config = array(
'name' => 'fbimporter',
'description' => 'fb',
'fetcher' => array(
'plugin_key' => 'FeedsHTTPFetcher',
'config' => array(
'auto_detect_feeds' => FALSE,
'use_pubsubhubbub' => FALSE,
'designated_hub' => '',
),
),
'parser' => array(
'plugin_key' => 'FeedsFacebookParser',
'config' => array(),
),
'processor' => array(
'plugin_key' => 'FeedsNodeProcessor',
'config' => array(
'content_type' => 'page',
'expire' => '-1',
'author' => 0,
'mappings' => array(
0 => array(
'source' => 'post_id',
'target' => 'guid',
'unique' => 0,
),
1 => array(
'source' => 'description',
'target' => 'body',
'unique' => FALSE,
),
2 => array(
'source' => 'from_name',
'target' => 'title',
'unique' => 0,
),
),
'update_existing' => '1',
'input_format' => 'full_html',
),
),
'content_type' => '',
'update' => 0,
'import_period' => '1800',
'expire_period' => 3600,
'import_on_create' => 0,
'process_in_background' => 0,
);
#5
This should do it. I would like at least a few people to test it though.
#6
tagging
#7
Hmm..did you intend to leave this in the patch?
+ 'graph.asfdasdfasdf.com/blarg/feed?access_token=133283760145143|tGew8jbxi1ctfVlYh35CPYij1eE',#8
Yes, it adds this case into the test. The test fails without the change to the regex.
#9
The 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.
#10
Doh, scratch that...I apparently had part of the feed importer disabled. It looks like it took the url properly! Calling this reviewed and tested.
#11
7.x http://drupalcode.org/project/feeds.git/commit/35d6097
#12
#13
#14
6.x http://drupalcode.org/project/feeds.git/commit/acf7cf5
#15
#16
Automatically closed -- issue fixed for 2 weeks with no activity.