1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Does anyone know how to implement this tumblr code?

Discussion in 'Making Money' started by PBNSurprise, Sep 18, 2015.

  1. PBNSurprise

    PBNSurprise Jr. VIP Jr. VIP

    Joined:
    Jul 22, 2015
    Messages:
    1,314
    Likes Received:
    600
    Gender:
    Male
    Occupation:
    Amazon
    Hi there I've been having trouble with my domain getting blocked on facebook. Was directed to this post here:

    http://www.blackhatworld.com/blackha...ml#post8202327

    Only problem is that I'm incredibly confused when it comes to implementing this code. I have a tumblr blog already and tried to edit the html multiple times but with no success. Can anyone help me get this working properly?
     
  2. ChanzGrande

    ChanzGrande Elite Member

    Joined:
    Feb 16, 2008
    Messages:
    2,484
    Likes Received:
    1,172
    Occupation:
    Accountant
    Location:
    Northern Woods Counting Money
    TayaX is the best source of information about this in my opinion.

    I could be wrong, but it appears to be code that would be implemented on one's own site. <- Definitely NOT Correct!

    If that is not correct, then you may have easily left out key portions of it as far as implementation. There are portions of TayaX's code which are to have you FILL IN THE BLANK so to speak. If you failed to alter these appropriately with your own settings, then the html might fail to function as expected.

    I'm sure TayaX might help you better understand the script if you approached him directly.

    This link may also have useful information for you as you consider how to alter the theme structure of your Tumblr Blogs:

    https://www.tumblr.com/docs/en/blog_customization

    Good luck!
     
    Last edited: Sep 18, 2015
  3. PBNSurprise

    PBNSurprise Jr. VIP Jr. VIP

    Joined:
    Jul 22, 2015
    Messages:
    1,314
    Likes Received:
    600
    Gender:
    Male
    Occupation:
    Amazon
    Yes I messaged him.

    I've been experimenting with this for a while now and can't seem to produce the correct results. I just need to be able to post a tumblr URL to facebook yet have it direct to my actual domain. This has been very difficult for me to solve and unfortunately I need to tackle this if I want to continue this method, I've come so far too so I don't want to just give up
     
  4. jtrash01

    jtrash01 Regular Member

    Joined:
    Nov 5, 2013
    Messages:
    270
    Likes Received:
    117
    Location:
    BARCELONA, SPAIN
    If I understood it correctly he (TayaX) on his script is setting the post permalink page with opengraph meta tags, to customize the appearance in facebook of that post. Reference: http://ogp.me you should read https://www.tumblr.com/docs/custom_themes too
    Then their posts has redirects (one using meta-redirect, one using js) using the clickthrough template placeholder "{LinkU-R-L}" wo/ dashes. So when you click in facebook your customized post. It will route to tumblr then to your offer.

    This way what he is archieving is the fact that facebook only points to *.tumblr.com domain and tumblr will be isolating the offers from facebook.

    You must realize that the script has two basic parts. The content thats is set to <head> tag (title + og: metas + redirect) and the <body> content with the real post.

    You can go by parts, and first change the code in your theme and get the redirects working, then you'll need to find the debug console on facebook dev's site to check og tags with your posts...

    EDIT: https://developers.facebook.com/tools/debug/
     
    • Thanks Thanks x 2
    Last edited: Sep 18, 2015
  5. TayaX

    TayaX Jr. VIP Jr. VIP

    Joined:
    Dec 13, 2010
    Messages:
    3,456
    Likes Received:
    1,931
    Occupation:
    Skype : TayaxBHW
    Location:
    France
    Home Page:
    @PBN :

    make sure you replace {"LinkUrl"} image by typing it in your actual code in Tumblr. For some reason, it wouldnt paste on BHW in the original post.
    Jtrash explained my small script very well. If after that you can't post, then try & switch account + clear cookies + change navigator & tumblr address.
     
    Last edited: Sep 18, 2015
  6. ChanzGrande

    ChanzGrande Elite Member

    Joined:
    Feb 16, 2008
    Messages:
    2,484
    Likes Received:
    1,172
    Occupation:
    Accountant
    Location:
    Northern Woods Counting Money
    Thanks for coming in and clearing up the confusion about this scripts usage jtrash01 and TayaX. Haven't been pushing stuff at Tumblr in a while, and I hadn't customized any themes since early last year, so it helps me too having this clarification.
     
  7. PBNSurprise

    PBNSurprise Jr. VIP Jr. VIP

    Joined:
    Jul 22, 2015
    Messages:
    1,314
    Likes Received:
    600
    Gender:
    Male
    Occupation:
    Amazon
    Hi, this is what I figured out: I made it so that when I post my tumblr url on facebook it shows up as a different URL that I've assigned in the code. But when someone clicks the URL they get sent to my tumblr instead. The problem is I don't know how to redirect from here to my offer page. This is the code that I'm trying to implement:

    <meta http-equiv="refresh" content="0;url={LinkU-R-L">
    <script type="text/javascript">
    window.location.href = "{LinkU-R-L"
    </script>

    (without the dashes in url)

    I can't put this code anywhere because tumblr won't let me save the html for some reason. I tried adding it in different areas, no success. Can I get a little step by step from this point please? I honestly don't know if what I've been doing up til this point is right, since my domain has already be blocked so when I entered it in the og:url space facebook said that there was an error when I tried to use the debugger. So I just used something popular like www.google.com and got the results I mentioned above. There is definitely a simple fix to this, anyone know?

    EDIT: I will pay anyone 10 dollars paypal if they can do this simple task for me: make it so that I can post my tumblr blog on facebook and have it so when someone clicks the link they are directed to my domain. If anyone can do this smoothly without encountering any blocks by facebook I will pay
     
    Last edited: Sep 18, 2015
  8. jtrash01

    jtrash01 Regular Member

    Joined:
    Nov 5, 2013
    Messages:
    270
    Likes Received:
    117
    Location:
    BARCELONA, SPAIN
    @PBNSurprise I think that you're doing it bad. And not understood how it really works. I hope that it helps:

    If you apply redirects directly to your main template. Outside the placeholders that tumblr provides for posts templates. This means that all the users, coming from facebook or tumblr will get redirected to your offer. You are probable not wanting this behaviour. Probably you'll prefer that only permalink pages are the ones that redirect to your offers.

    {LinkU-R-L} In your template. As always, without dashes. *Must* be inside your post-type template, ie: your {block:posts}{block:photo} HERE {/block:photo}{/block:posts}. This implies that you must put your offer in the clickthrough link of the post. And your clickthrough link will be then in your redirect code, automagically, or if you prefer, interpolated.

    You should double, and triple-check. If the meta tags below conform the http://ogp.me standard. Or it can be a pain in the ass against the facebook debug tool. I can't remember if this could take 24-48h for facebook to spider (read) your custom meta tags... You should also consider that the meta tags are also taking data from your posts: {PhotoAlt}, {Permalink}, {block:HasTags}{block:Tags}{Tag}{/block:Tags} {/block:HasTags}, {PhotoURL-500}

    Reference for relevant placeholders on the tumblr layout system:
    https://www.tumblr.com/docs/es/custom_themes#posts
    https://www.tumblr.com/docs/es/custom_themes#photo-posts

    For facebook only. You should take care of "facebook images aspect-ratio" (Google it NOW) to get previews like @TayaX got in his sample ; )
    Code:
    <!-- Within the <head> tag of your template -->
    <!-- You must replace the {LinkU-R-L} without dashes version -->
    {block:Posts}
        {block:Photo}
            <title> 
                {block:Caption}
                    {PhotoAlt}
                {/block:Caption}
            </title>
    
            <meta property="og:title" content="{PhotoAlt}"/>
            <meta property="og:type" content="article"/>
            <meta property="og:url" content="{Permalink}" />
            <meta property="og:description" content="{block:HasTags}{block:Tags}{Tag}{/block:Tags} {/block:HasTags}"/>
            <meta property="og:site_name" content="Tumblr"/>
            <meta property="og:image" content="{PhotoURL-500}"/>
    
            <meta http-equiv="refresh" content="0;url="{LinkU-R-L}">
    
            <script type="text/javascript">
                window.location.href = "{LinkU-R-L}";
            </script>
        {/block:Photo}
    {/block:Posts}
    Spoon-feed ? :)
     
    Last edited: Sep 19, 2015