Download & Extend

Invalid URL (even though it's valid)

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:

Anyone get this to work recently? (wondering if FB changed anything?)

Comments

#1

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?

#2

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?

#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

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,
);

#5

Status:active» needs review

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

AttachmentSizeStatusTest resultOperations
feeds-vaid_url-1688294-5.patch1.31 KBIgnored: Check issue status.NoneNone

#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

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.

#10

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.

#11

Status:reviewed & tested by the community» fixed

7.x http://drupalcode.org/project/feeds.git/commit/35d6097

#12

Status:fixed» patch (to be ported)

#13

Version:7.x-2.x-dev» 6.x-1.x-dev

#14

#15

Status:patch (to be ported)» fixed

#16

Status:fixed» closed (fixed)

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