problem with facebook app

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ammu
    New Member
    • Aug 2011
    • 78

    problem with facebook app

    How to remove ?ref=nf from images in feed. Now it looks like http://www.domain.com/117?ref=nf. I want to remove ?ref=nf from that.
  • jdstankosky
    New Member
    • Sep 2012
    • 30

    #2
    Code:
    $url = "http://www.domain.com/117?ref=nf";
    
    echo substr($url, 0, -7);

    Comment

    • Ammu
      New Member
      • Aug 2011
      • 78

      #3
      I have checked with this code. But showing same error again.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        What error? You never said anything about an error.

        Comment

        • Ammu
          New Member
          • Aug 2011
          • 78

          #5
          actually now my url looks like http://www.domain.com/117?ref=nf.
          But I want http://www.domain.com/117 only.

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            You give us no error and no code to work from, how do you expect us to help?

            Comment

            • Ammu
              New Member
              • Aug 2011
              • 78

              #7
              Code:
              <script type="text/javascript">
              $(document).ready(function(){
              $('#share_button').live('click', function(e){
              e.preventDefault();
              FB.ui(
              {
              method: 'feed',
              name: 'title',
              link: 'http://www.domain.com/',
              picture: 'http://www.domain.com/public/images/logo.png',
              caption: 'Visit Site
              description: '<a href=www.domain.com>Domain</a>',
              
              message: ''
              });
              });
              });
              </script>
              This code for facebook share

              Comment

              • Rabbit
                Recognized Expert MVP
                • Jan 2007
                • 12517

                #8
                I see no reference anywhere in your code to http://www.domain.com/117.

                Comment

                • jdstankosky
                  New Member
                  • Sep 2012
                  • 30

                  #9
                  Are you using jQuery correctly?
                  Have you included the necessary files?
                  Have you tried console debugging?
                  Where's your PHP code?
                  Do you need the javascript equivelant of substr()?
                  Where's your reference to http://www.domain.com/117?ref=nf ?
                  What error are you getting?
                  Where's your error output?

                  Are you trolling hard right now?
                  You mad bro?

                  Comment

                  • Ammu
                    New Member
                    • Aug 2011
                    • 78

                    #10
                    Code:
                    <script>
                      window.fbAsyncInit = function() {
                        FB.init({
                          appId  : '455892144786652',
                    	  $app_secret : '95d5fg52g45gh1445565d459g544',
                          status : true, 
                          cookie : true, 
                          xfbml  : true  
                        });
                      };
                    
                      (function() {
                        var e = document.createElement('script');
                        e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
                        e.async = true;
                        document.getElementById('fb-root').appendChild(e);
                      }());
                    </script>
                    
                    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
                    <img id ="share_button" src="http://www.domain.com/public/images/facebook.jpg">
                    <? $link2face='http://www.domain.com/articles/25/title'; 
                    $link2face=str_replace("?ref=nf","",$link2face);
                    ?>
                    <script type="text/javascript">
                    $(document).ready(function(){
                    $('#share_button').live('click', function(e){
                    e.preventDefault();
                    FB.ui(
                    {
                    method: 'feed',
                    name: '<?php echo 'title'; ?>',
                    link: '<? echo 'http://www.domain.com/'; ?>',
                    picture: 'http://www.domain.com/uploads/image1.png',
                    caption: 'Visit Domain Name',
                    description: '<a href=www.domain.com>Domain</a>',
                    message: ''
                    });
                    });
                    });
                    </script>
                    This is my code for facebook share. When I click on article it is successfully posted on my ( facebook )wall. It displays Image with title. When i click on title from my face book post it directly go to particular page .At that time url is correct. ( http://www.domain.com/articles/25/title ).
                    When i click on image it also going to particular page but url will be http://www.domain.com/articles/25/title?ref=nf .
                    I mean there is an extension (ref=nf) after my original url . so it is affected my routing and page shows error.

                    Comment

                    • Dormilich
                      Recognized Expert Expert
                      • Aug 2008
                      • 8694

                      #11
                      I mean there is an extension (ref=nf) after my original url . so it is affected my routing and page shows error.
                      1) that’s not an extension, that’s an URL query string.
                      2) and what would that page error be?

                      Comment

                      • Ammu
                        New Member
                        • Aug 2011
                        • 78

                        #12
                        Code:
                        $route['articles/(:num)/(:any)']= 'articles/description/$1/$2';
                        my routing file look like this.
                        In my url , it should be http://www.domain.com/articles/25/title.
                        otherwise page will ot display or display with some errors. just i need to remove that query string("ref=nf" ).

                        Comment

                        Working...