Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The request to scrape the URL timed out. #198

Closed
Afoster2 opened this issue Jun 10, 2021 · 1 comment
Closed

The request to scrape the URL timed out. #198

Afoster2 opened this issue Jun 10, 2021 · 1 comment

Comments

@Afoster2
Copy link

Afoster2 commented Jun 10, 2021

Trying to share to facebook takes a very long time to load and is FB seems to be ignoring my meta og fields.

Errors from facebook

Curl Timeout             The request to scrape the URL timed out.
Curl Error                  Curl error: 28 (OPERATION_TIMEOUTED)
Inferred Property     The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
Missing Properties  The following required properties are missing: og:url, og:type, og:title, og:image, og:description, fb:app_id

reports show.html.haml

- content_for :head do
  %meta{:content => "****************", :property => "fb:app_id"}/
  %meta{:content => "website", :property => "og:type"}/
  %meta{:content => "https://www.floundergiggin.com/ + #{@report}", :property => "og:url"}/
  %meta{:content => "#{@report.title}",:property => "og:title"}/
  %meta{:content => "#{simple_format(@report.title, {}, :sanitize => false)}", :property => "og:description"}/

= social_share_button_tag(@report.title, :url => report_url(@report), desc: @report.title)

I have used this same setup for several projects previously and now they are all doing the same.

@Afoster2
Copy link
Author

Ok found a solution. After more digging, I found this: https://gorails.com/forum/sharing-on-social-network

<% content_for :head do %>
    <!-- Open Graph tags -->
    <meta property="og:title" content="<%= @article.title %>" />
    <meta property="og:type" content="article" />
    <meta property="og:url" content="<%= article_url(@article) %>" />
    <meta property="og:description" content="<%= @article.body %>" />
      <meta property="og:image" content="<%= absolute_image_url(img.attachment.url) %>" />
    <meta property="fb:app_id" content="12345678" />
    <!-- Twitter card property -->
    <meta name="twitter:card" content="<%= @article.title %>">
    <meta name="twitter:site" content="@mytwitter">
  <% end %> 

Solved. I don't know if it was the order in which I had the og tags or if it was removing the #{}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant