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?)

#5 feeds-vaid_url-1688294-5.patch1.31 KBtwistor
Members fund testing for the Drupal project. Drupal Association Learn more


jomue’s picture

Project: Feeds: Facebook parser » Feeds
Version: 7.x-1.x-dev » 7.x-2.x-dev

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?

twistor’s picture

Status: Active » Postponed (maintainer needs more info)

https://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?

Rob_Feature’s picture

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:


(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)

Rob_Feature’s picture

Status: Postponed (maintainer needs more info) » Active

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,

twistor’s picture

Status: Active » Needs review
1.31 KB

This should do it. I would like at least a few people to test it though.

twistor’s picture

Issue tags: +Needs backport to 6.x


Rob_Feature’s picture

Hmm..did you intend to leave this in the patch?

+      'graph.asfdasdfasdf.com/blarg/feed?access_token=133283760145143|tGew8jbxi1ctfVlYh35CPYij1eE',
twistor’s picture

Yes, it adds this case into the test. The test fails without the change to the regex.

Rob_Feature’s picture

Status: Needs review » Needs work

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.

Rob_Feature’s picture

Status: Needs work » Reviewed & tested by the community

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.

twistor’s picture

Status: Reviewed & tested by the community » Fixed
twistor’s picture

Status: Fixed » Patch (to be ported)
twistor’s picture

Version: 7.x-2.x-dev » 6.x-1.x-dev
twistor’s picture

twistor’s picture

Status: Patch (to be ported) » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.