Title: Wrong permalink
Last modified: August 22, 2016

---

# Wrong permalink

 *  Resolved [BGH_](https://wordpress.org/support/users/bgh_/)
 * (@bgh_)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wrong-permalink-1/)
 * Hello and thank you for this plugin!
 * Is there a way to change the permalink to the default structure that I’ve set?
   Because it presents the links as: `www.example.com/?p=2265`, but my current custom
   permalink is set as it follows `www.example.com/category/postname`.
 * This issue seems to cause an error when broadcasting, since the featured image
   doesn’t print right in Facebook nor in Twitter.
 * Please, is there any way to fix this issue?
 * Thanks in advance!
 * Regards.
 * PS: I have added open graphs, so that shouldn’t be the problem.
 * [https://wordpress.org/plugins/social/](https://wordpress.org/plugins/social/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [BGH_](https://wordpress.org/support/users/bgh_/)
 * (@bgh_)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wrong-permalink-1/#post-5461453)
 * Without this stuff sorted out, this plugin is rather futile at this current state.
 * Uninstalling this, as I post.
 * Will re-install, when this get a better, proper update to work.
 * Regards.
 *  [TylerTyssedal](https://wordpress.org/support/users/tylertyssedal/)
 * (@tylertyssedal)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wrong-permalink-1/#post-5461499)
 * Same here. This makes all of our social media Like links and whatnot useless 
   on the site, which is a pity.
 *  Thread Starter [BGH_](https://wordpress.org/support/users/bgh_/)
 * (@bgh_)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wrong-permalink-1/#post-5461500)
 * I’m thinking in the following workaround: trying not to use `{url}` token when
   broadcasting. That way it should broadcast to Facebook (in this case) without
   a link, so when it is succesfully broadcasted, then I’ll edit the post on Facebook
   adding the link by myself.
 * It’s not pretty, and I’m not so sure if this would solve the issue, but it should
   be no harm to try.
 * Will report back with the result.
 * EDIT: Tried and no luck. It always paste the link on Facebook when you’re about
   to broadcast your post, even without `{url}` token set :/. I suppose this can
   be modified inside the files of the plugin, but I’m not really sure where to 
   edit it.
 *  Thread Starter [BGH_](https://wordpress.org/support/users/bgh_/)
 * (@bgh_)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wrong-permalink-1/#post-5461504)
 * **FOUND THE WAY TO FIX IT! BACKUP FIRST AND EDIT AT YOUR OWN RISK**
 * After struggling a lot, finally, I found a workaround, or somehow. On `social/
   lib/social/service.php` look for line 297, and you should do this:
 * Find:
 *     ```
       case '{url}':
       					$url = social_get_shortlink($post->ID);
       					if (empty($url)) {
       						$url = home_url('?p='.$post->ID);
       					}
       					$url = apply_filters('social_broadcast_permalink', $url, $post, $this);
       					$content = esc_url_raw($url);
       					break;
       ```
   
 * Replace to:
 *     ```
       case '{url}':
       					$url = social_get_shortlink($post->ID);
       					if (empty($url)) {
       						$url = get_permalink($post->ID);
       					}
       					$url = apply_filters('social_broadcast_permalink', $url, $post, $this);
       					$content = esc_url_raw($url);
       					break;
       ```
   
 * This way Twitter will still use the shortlink (site.com/?p=2223), but Facebook
   will broadcast your own permalink on the Facebook wall :D.
 * Issue marked as resolved!
 *  [gik25](https://wordpress.org/support/users/gik25/)
 * (@gik25)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/wrong-permalink-1/#post-5461514)
 * The support for the plugin is really bad.. BGH_ thanks for finding how to solve.
   
   It’s really sad that a so HUGE bug is still not fixed.
 *  [alexkingorg](https://wordpress.org/support/users/alexkingorg/)
 * (@alexkingorg)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/wrong-permalink-1/#post-5461515)
 * Or you could read the FAQ.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Wrong permalink’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/social.svg)
 * [Social](https://wordpress.org/plugins/social/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/social/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/social/)
 * [Active Topics](https://wordpress.org/support/plugin/social/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/social/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/social/reviews/)

## Tags

 * [twitter](https://wordpress.org/support/topic-tag/twitter/)
 * [wrong permalink](https://wordpress.org/support/topic-tag/wrong-permalink/)

 * 6 replies
 * 4 participants
 * Last reply from: [alexkingorg](https://wordpress.org/support/users/alexkingorg/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/wrong-permalink-1/#post-5461515)
 * Status: resolved